zellij-org / zellij

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

Mouse not working, out putting text mouse click and scroll after ssh disconnect/broken pipe #3333

Open nfaux opened 2 months ago

nfaux commented 2 months ago

Issues with the Zellij UI / behavior / crash

Issue description

After a live ssh connection breaks client_loop: send disconnect: Broken pipe, when using the mouse/trackpad, all clicks and scrolling actions do not work and are captured/registered/print to screen as 0;32;66M0;32;66m0;50 for example.

Minimal reproduction

  1. Connect to remove server via ssh, possible while connected to a VPN.
  2. Leave connected until it times out, sending client_loop: send disconnect: Broken pipe. If on a VPN, just disconnecting the VPN, will lead to the Broken pipe.
  3. Start to use the mouse, to scroll, select text, in the session which the connection was broken.

Other relevant information

Hitting enter/return sends the mouse input text to the shell, which as expected returns command not found. If another panel/session is open and was not connected to the remote server, the mouse/trackpad behaviour is as expected. It only happens in the panel/session which the ssh connection was lost.

I have noticed that a forced disconnect, i.e. close a VPN connection manually, does not alway lead to the described behaviour. It maybe a timeout issue.

$ zsh --version
zsh 5.9 (x86_64-apple-darwin23.0)

$ zellij --version
zellij 0.39.2

macOS: 14.4.1 MacBookPro 2.3Gz 8-core Intel

giyany commented 1 month ago

I haven't been able to reproduce this one yet (as it only occurs when the connection breaks), but I'm keeping an eye out for issues related to ssh breaking. If this occurs again, perhaps you can get the log immediately afterwards?