Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KDL layouts: problematic percentage sizes #1825

Open
raphCode opened this issue Oct 19, 2022 · 1 comment
Open

KDL layouts: problematic percentage sizes #1825

raphCode opened this issue Oct 19, 2022 · 1 comment

Comments

@raphCode
Copy link
Contributor

raphCode commented Oct 19, 2022

version: main, roughly 12d35bd

There are some relative sizes that can cause trouble:

Small sizes: 0% - (100/number of terminal lines)%

layout {
    pane size="0%"
    pane
}

Upon loading this layout I get either:

  • Bye from zellij!
  • Garbage from the sixel image palette stuff (Probably the terminal emulator sending its response into my shell prompt)

log shows:

ERROR  |zellij_server::tab       | 2022-10-19 16:34:04.125 [screen    ] [zellij-server/src/tab/mod.rs:609]: No room on screen for this layout!
INFO   |zellij_client            | 2022-10-19 16:34:04.125 [main      ] [zellij-client/src/lib.rs:393]: Bye from Zellij!
INFO   |zellij_server::wasm_vm   | 2022-10-19 16:34:04.129 [wasm      ] [zellij-server/src/wasm_vm.rs:213]: wasm main thread exits
ERROR  |zellij_utils::errors::not| 2022-10-19 16:34:04.129 [async-std/runti] [zellij-utils/src/errors.rs:435]: Panic occured:
             thread: async-std/runtime
             location: At zellij-server/src/terminal_bytes.rs:124:14
             message: called `Result::unwrap()` on an `Err` value: failed to send message to screen

This also happens with size=0

Sizes summing > 100%

layout {
    pane size="50%"
    pane size="50%"
    pane size="50%"
}

This opens zellij, but the last pane is only 1 line tall, and also resizing is kinda broken: The upper panes keep their original size if they still have vertical space. The first pane that exceeds the window height is resized, but fails to display its bottom pane frame:
image
When the window gets bigger, the extra space is not filled at all:
image

With four panes of size 50% I can even get a server crash if I try to close them (similar symptoms like #1821)

@imsnif
Copy link
Member

imsnif commented Oct 20, 2022

I'm issuing a fix for the 0% case. The other issue has been with us for a while and will require a much needed overhaul to our resizing system. The latter will also fix all the fixed pane issues. For now I'm afraid we're going to have to trust users on this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants