zellij-org / zellij

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

Session manager doesn't react on any keys #3756

Closed estin closed 1 week ago

estin commented 1 week ago

Hi! after update to 0.41.1 (arch linux via pacman) popup panes doesn't accept commands

Case

  1. start

    rm -rf  /tmp/zellij-1000
    rm -rf ~/.cache/zellij
    zellij --debug
  2. Unlock (locked by default) and open session-manager Ctrl-g Ctrl-o w

  3. Session manager doesn't react on any keys and all pop-up panes doesn't react too.

basic info and logs `zellij --version`: `zellij 0.41.1` `stty size`: `47 240` `uname -av`: `Linux archlinux 6.11.6-arch1-1 #1 SMP PREEMPT_DYNAMIC Fri, 01 Nov 2024 03:30:41 +0000 x86_64 GNU/Linux` [zellij.log](https://github.com/user-attachments/files/17697736/zellij.log) [zellij-22.log](https://github.com/user-attachments/files/17697738/zellij-22.log)

P.S. I can help to debug it

estin commented 1 week ago

hm... popup panes are locked by default too )

Ctrl-g and they start works )

imsnif commented 1 week ago

Does it work without a config? Eg. with zellij setup --clean?

estin commented 1 week ago

Does it work without a config? Eg. with zellij setup --clean?

yes. it work as expected. no lock by default and popup panes accept commands

imsnif commented 1 week ago

Sounds like this is something specific in the config then? I realize the behavior may have changed in the version, but if you'd like to troubleshoot it and find an exact reproduction of what worked in a different way before than now, that would be great.

estin commented 1 week ago

Can reproduce by following configs.

on SwitchToMode "locked" works as expected

on SwitchToMode "normal" requires extra Ctrl-g to start typing session name on new zellij version. It was my config for pervious zellij version.

Ctrl-g Ctrl-o w - start typing session name (ok) ```conf keybinds { locked { bind "Ctrl g" { SwitchToMode "normal"; } } session { bind "Ctrl o" { SwitchToMode "normal"; } bind "Ctrl s" { SwitchToMode "scroll"; } bind "d" { Detach; } bind "w" { LaunchOrFocusPlugin "session-manager" { floating true move_to_focused_tab true }; SwitchToMode "locked" // !!!!! } } } plugins { tab-bar location="zellij:tab-bar" status-bar location="zellij:status-bar" strider location="zellij:strider" compact-bar location="zellij:compact-bar" session-manager location="zellij:session-manager" welcome-screen location="zellij:session-manager" { welcome_screen true } filepicker location="zellij:strider" { cwd "/" } configuration location="zellij:configuration" plugin-manager location="zellij:plugin-manager" } default_mode "locked" ``` ![locked](https://github.com/user-attachments/assets/f889a596-2732-4c3e-98de-86fd7691ba66)
Ctrl-g Ctrl-o w start typing session name (nothing) Ctrl-g start typing session name (ok) ```conf keybinds { locked { bind "Ctrl g" { SwitchToMode "normal"; } } session { bind "Ctrl o" { SwitchToMode "normal"; } bind "Ctrl s" { SwitchToMode "scroll"; } bind "d" { Detach; } bind "w" { LaunchOrFocusPlugin "session-manager" { floating true move_to_focused_tab true }; SwitchToMode "normal" // !!!!! } } } plugins { tab-bar location="zellij:tab-bar" status-bar location="zellij:status-bar" strider location="zellij:strider" compact-bar location="zellij:compact-bar" session-manager location="zellij:session-manager" welcome-screen location="zellij:session-manager" { welcome_screen true } filepicker location="zellij:strider" { cwd "/" } configuration location="zellij:configuration" plugin-manager location="zellij:plugin-manager" } default_mode "locked" ``` ![normal](https://github.com/user-attachments/assets/4b4c30b7-0bc7-49ec-b15a-0f899b9f588b)
imsnif commented 1 week ago

Zellij only sends keys to the panes running inside it (terminal panes or plugin panes such as the session manager) in locked mode and in the base mode (in your case it is also locked). This is a fix from the previous version, I think doing otherwise would be unexpected (because then we'd reach a situation in which in normal mode - for example - Zellij would intercept some keys and send the others to the underlying plugin/terminal).

Sounds like you found a fix though, by getting Ctrl o + w to switch back to locked mode, right?

estin commented 1 week ago

yes, now understand locked logic. thanks!

imsnif commented 1 week ago

Sure thing, sorry for the confusion!