Expand description
Tabs (issue #29, 2026-05-22).
In vim a “tab page” is a container of windows — each tab owns its own pane tree. Buffers stay globally shared so the same buffer can appear in multiple tabs.
Lattice mirrors that model:
TabSlotis a stash of one tab’s pane tree + optional label.Editor.pane_treeremains the livePaneTreefor the active tab (zero-churn for the hundreds ofeditor.pane_treecall sites).Editor.tabs: Vec<TabSlot>holds one entry per tab, including the active one. The active tab’spanesfield in that vec is a default placeholder while it’s “live”; on tab switch wemem::swapbetweeneditor.pane_treeandeditor.tabs[target].panes.
§Tab IDs
Tabs carry a process-monotonic TabId (parallels PaneId /
BufferId). Useful for stable references in render state and
events — index-based addressing changes when tabs are reordered
or closed.
Structs§
- TabId
- Process-monotonic tab id. Stable across reorder / close.
- TabSlot
- One tab’s stashed state. The active tab’s
panesis a default-empty placeholder while that tab is live (its real panes live oneditor.pane_tree). Inactive tabs hold the full pane tree here.
Enums§
- Tabline
Show :set tabline.show=...(issue #29, 2026-05-22). Controls when the tabline row is visible at the top of the screen.