zellij-org / zellij

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

Vim inside zellij not resizing when terminal is resized #3398

Open andrearosasco opened 3 months ago

andrearosasco commented 3 months ago

1. Graphical issue inside a terminal pane (eg. something does not look as it should)

Hello, I'm not doing all the steps as I don't know how to recreate the issue but sometimes it just happens.

Basically, in a session with multiple tabs it might happen that a tab becomes unresponsive to terminal resizing i.e. while changing the terminal emulator window size the value returned by stty size remain the same on that tab.

This does not affect zellij interface which remains responsive but the interface of the programs running in that tabs. I attached a video of the problem affecting vim.

https://github.com/zellij-org/zellij/assets/47559809/7f0eebfb-aec9-4cce-8d62-447a7bd0833e

Basic information

zellij --version: 0.40.1

stty size: 25 118

uname -av or ver(Windows):

Edit

I found the problem: I have zellij running on a remote machine. The problem presents itself when in a certain tab I run the command qsub -I ./run_job.sh (it is a pbs command) to get an interactive session on a node of the cluster node. When the requested resources are allocated I get a terminal inside a node and the resizing stops working.

Note: if from a zellij tab on the remote machine, I directly ssh a node (no qsub involved) and then I run something like nvim on that node, everything works without any issue. So, it has something to do with qsub.

I'm guessing that, if the resizing signals are not forwarded by qsub -I, there is not much to do on your side. Feel free to close the issue if you agree.

Edit 2

The only soultion to this is to run a non-interactive job which starts a zellij session and then hangs. Then, ssh the node and attach to the session so that any command can only use the resources reserved through qsub. The problem is that with zellij I don't think it is possible to create a session without attaching to it. For now I'm falling back to tmux but it would be a nice feature to add.