diff options
| author | user <user@clank> | 2026-08-11 17:00:37 +0200 |
|---|---|---|
| committer | user <user@clank> | 2026-08-11 17:00:37 +0200 |
| commit | 508b5aa87ced4c7aab38bcb0e34c4158e5b4e101 (patch) | |
| tree | 511485d45371596801f25354f62bc938e882a890 /zellij-utils/src/input/cli_assets.rs | |
| parent | sl0p: warn when the responsive layout has no swap layout to collapse into (diff) | |
| download | sl0ppij-508b5aa87ced4c7aab38bcb0e34c4158e5b4e101.tar.gz sl0ppij-508b5aa87ced4c7aab38bcb0e34c4158e5b4e101.tar.xz sl0ppij-508b5aa87ced4c7aab38bcb0e34c4158e5b4e101.zip | |
sl0p: synthesize a stack layout when none exists to collapse into
The collapse selects a swap layout by name, and a custom layout file only gets
swap layouts from a hand-written sibling "<layout>.swap.kdl". So for most
layouts there was nothing to select and the feature silently did nothing --
requiring a boilerplate file per layout to use it at all.
Now a missing layout is synthesized: every pane flattened into one stack, in
layout order. Appended rather than inserted, so it cannot shift the BASE layout
at position 0, which is what the collapse restores back to.
Synthesized lazily, at the first collapse, rather than up front: a stack sitting
in the swap cycle would let auto_layout apply it spontaneously when a pane is
added, stacking panes on a perfectly wide terminal.
Also scopes the damaged-layout guard. With no swap layouts, relayout finds
nothing applicable on the first pane added, gives up and marks the tab damaged
-- permanently, and with nothing to do with user intent. Honouring that flag
disabled the collapse for exactly the bare layouts this fallback targets, so it
is now only consulted when the tab has swap layouts the user actually defined.
Diffstat (limited to 'zellij-utils/src/input/cli_assets.rs')
0 files changed, 0 insertions, 0 deletions
