`previous-swap-layout` doesn't work when loading a layout from a file
nando-digital opened this issue · comments
2. Issues with the Zellij UI / behavior / crash
Issue description
previous-swap-layout
and next-swap-layout
do not work when zellij was started with a layout located in a file. When executing zellij action next-swap-layout
inside zellij nothing happens (no error) even though the split direction should change. I noticed this because the ALT [
keybinding didn't work.
Minimal reproduction
- Start zellij with
zellij --layout default
- Open a second pane
- Run
zellij action next-swap-layout
(orALT ]
when using default shortcuts) - Notice how the split direction changed
- Run
zellij setup --dump-layout default > someFile
inside a new terminal - Start zellij again with
zellij --layout /path/to/someFile
- Open a second pane
- Run
zellij action next-swap-layout
(orALT ]
when using default shortcuts) - Notice how the split direction has not changed
Even though the exact same layout is used the behavior is different.
Other relevant information
It doesn't matter whether the layout is specified in the zellij config or with the --layout
argument
I use zellij 0.40.0 on Arch Linux (WM: Hyprland, Terminal: foot)
You'll need to include swap_layouts
in the custom layout file for this to work: https://zellij.dev/documentation/swap-layouts
Sorry, I didn't catch that. It might be worth considering a comment in the default layout (when dumped) that the swap layout is not included, it can be quite confusing when the default layout loaded from a file doesn't behave the same as the default layout. I guess I should read the docs more carefully next time. Thanks for the answer!
I agree - the swap layouts are not one of my best ideas. I hope to improve upon them in the future.