zellij-org / zellij

A terminal workspace with batteries included
https://zellij.dev
MIT License
20.57k stars 637 forks source link

New pane opens on the left #3338

Open janos-r opened 4 months ago

janos-r commented 4 months ago

Basic information

zellij --version: zellij 0.40.1

stty size: 135 col, 34 rows

uname -av or ver(Windows): Linux 5.15.0-106-generic #116-Ubuntu SMP Wed Apr 17 09:17:56 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux

2. Issues with the Zellij UI / behavior / crash

Issue description

The purpose of the config below is to have the same default swap layouts, but with a custom starting directory. The bellow layout config almost works, but when the cwd part is present, new panes (alt+n) open on the left from the current pane. Without the cwd, panes open on the right (as expected).

Minimal reproduction

cd ~/.config/zellij/layouts zellij setup --dump-swap-layout default > default.kdl add

layout {
    ui cwd="~/Documents"
   ... <--- the dump
}

Other relevant information

When in the scrnshot bellow, after hitting alt+] to flip the layout, the second pane is suddenly on the bottom, and with another press, it is on the right, as if it were on the right in the beginning, as it should have been.

scrnshot

image

thomjiji commented 3 months ago

I found that when I quit a session (Ctrl q) and then resurrected/re-attach it (zellij attach <session-name>), the new pane will appear on the left instead of the right which is confusing. If I create and enter a new session (by running zellij), new pane will appear on the right which is the default.

image
TrevorHinesley commented 1 month ago

I believe I'm experiencing the same thing:

I'd expect this to open a new pane on the right, with the next three slotted underneath (so, 1 pane on the left, then 3 smaller ones split horizontally on the right), but they open on the left in erratic order:

swap_tiled_layout {
  tab max_panes=4 {
    pane split_direction="vertical" {
      pane
      pane split_direction="horizontal" {
        pane
        pane
        pane
      }
    }
  }
}