zellij-org / zellij

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

Corrupted/lost text when scrolling in vertically split neovim window using wezterm with `wezterm` TERM enviornment variable #3412

Open CarbonChauvinist opened 3 weeks ago

CarbonChauvinist commented 3 weeks ago

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

Please attach the files that were created in /tmp/zellij-1000/zellij-log/ to the extent you are comfortable with.

zellij-12.log zellij.log

Basic information

zellij --version: zellij 0.41.0

stty size: 32 145

uname -av: Linux lap 6.9.3-arch1-1 #1 SMP PREEMPT_DYNAMIC Fri, 31 May 2024 15:14:45 +0000 x86_64 GNU/Linux

Further information

After further testing using the terminals I use this only occurs with Wezterm when run with wezterm TERM enviornment variable. This may be a Wezterm issue?

Wezterm version: wezterm 20240203-110809-5046fc22

The terminals I tested where the issue did not present itself: (terminal/TERM)

Verified this issue is present on the latest build of zellij (using zellij-git package from aur). Currently using the development version of neovim (NVIM v0.11.0-dev-199+g4881211097).

When opening neovim and creating a vertical split on any file within neovim, scroll down in one window within neovim and observe that the other split window begins to scroll as well and then eventually becomes garbled and loses text. One can switch back and forth between windows and scroll up and down and observe the same behavior on the opposite window from the one currently being scrolled.

To reproduce:

  1. run wezterm with term set to wezterm in config
  2. run zellij with default settings.
  3. run development version of neovim also in a clean state with no plugins loaded (i.e. nvim --clean -u NONE -i NONE)
  4. Open any file
  5. create a vertical split
  6. Scroll down in the current window and observe the reported issue in the neighboring window within neovim

Attached a short screen capture of the behavior for reference.

Also note, in Wezterm with wezterm TERM env this issue does not present itself when running latest version of vim available in the standard Arch repos, nor does it present itself when running neovim without zellij.

May be related to issue #263

edit: uploaded new video file as original may have been corrupted somehow

https://github.com/zellij-org/zellij/assets/21365869/c4114f1f-5138-463d-85f7-bc5106d71ca7

mike-lloyd03 commented 2 weeks ago

I'm having this problem as well and it only happens inside Zellij and nvim. However, when downgrading to 0.40.0, it's still happening.

I think this relates to nvim 0.10.0. Downgrading to nvim 0.9.5 and Zellij 0.40.0 fixes the problem for me.

nvim 0.10.0 and Zellij 0.40.1: visual artifacts confirmed nvim 0.9.5 and Zellij 0.40.1: visual artifacts confirmed nvim 0.10.0 and Zellij 0.40.0: visual artifacts confirmed nvim 0.9.5 and Zellij 0.40.0: no visual artifacts

mike-lloyd03 commented 2 weeks ago

I take it back. This appears to be happening in nvim 0.9.5 and Zellij 0.40.0. I'm noticing it in Wezterm and Kitty.

mike-lloyd03 commented 1 week ago

Okay I did some more testing. It looks like this is limited to Zellij 0.40.1. If I downgrade to 0.40.0 and delete-all-sessions, the problem disappears.