Skip to main content

Module set_lens

Module set_lens 

Source
Expand description

intent/set-lens handling and the per-pane active-lens state.

Switching the active lens for a pane is data, not a rebuild: the active lens per pane is a small SIM value (a map of pane id to lens id). Applying an intent/set-lens returns an updated state value and never touches the value being shown, so the choice persists in the workspace value (P6) by virtue of being a value itself.

Functions§

active_lens
The active lens for pane, if one has been chosen.
apply_set_lens
Apply an intent/set-lens, returning the updated pane-lens state. The shown value is never read or written here; only the pane’s active lens changes.
empty_pane_lenses
An empty pane-lens state.