Goal: Add tabs as saved window layouts, not as another buffer abstraction.
Context: The PRD treats tabs as groups of split layouts.
This should land after the split window layout tree so tabs can swap whole layouts instead of special-casing editor state.
Proposed approach:
- Add a tab list where each tab owns one window layout tree.
- Keep buffers shared across tabs through the editor-level buffer list.
- Add commands for
tab-new, tab-next, and tab-close.
- Bind
C-x t 2, C-x t o, and C-x t 0 if the keymap supports those sequences cleanly.
- Render a restrained tab indicator or modeline/tabline treatment.
- Preserve dirty state, save behavior, and focused window state across tab switches.
Acceptance criteria:
- Creating a new tab creates a fresh layout while keeping existing buffers available.
- Switching tabs restores the previous layout and focused window for that tab.
- Closing a tab removes that layout without deleting buffers or unsaved edits.
- The last tab cannot be closed into an invalid empty editor state.
- Dirty buffers remain protected on quit even when they are not visible in the active tab.
- Existing split behavior still works inside each tab.
Verification:
- Run
cargo test.
- Manually create tabs, split windows inside a tab, switch tabs, close tabs, save dirty buffers, and quit.
- Manually confirm terminal cleanup after exit.
Out of scope:
- Named tabs.
- Persisted sessions.
- Dragging or reordering tabs.
- Tab-specific working directories.
- Embedded terminal panes.
Goal: Add tabs as saved window layouts, not as another buffer abstraction.
Context: The PRD treats tabs as groups of split layouts.
This should land after the split window layout tree so tabs can swap whole layouts instead of special-casing editor state.
Proposed approach:
tab-new,tab-next, andtab-close.C-x t 2,C-x t o, andC-x t 0if the keymap supports those sequences cleanly.Acceptance criteria:
Verification:
cargo test.Out of scope: