-
-
Notifications
You must be signed in to change notification settings - Fork 833
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
wezterm terminfo leads to corrupted buffer text when scrolling in zellij + neovim vertical split #5750
Comments
I have the same problem |
I have the same problem. But I can reproduce with just neovim, no need for zellij. See my comment at neovim/neovim#17142 (comment). I can reproduce with the following steps:
Kooha-2024-07-22-23-26-37.webmNeovim version: 0.10.0 |
Since this problem doesn't happen if TERM is set to xterm-256color, my guess is that it is an issue with the terminfo entry for |
@tmccombs I don't know if this covers all the problems reported in this issue, but your particular case is probably caused by the code here: wezterm/term/src/terminalstate/mod.rs Lines 2317 to 2321 in 7e8fdc1
Note that the left margin is incorrect clamped to the height of the display rather than the width. So when your screen height is 23 rows, the maximum width of the left half of a split is 23, and that's why only the first 23 columns remain static when you're scrolling the right hand side. |
@tmccombs I recently encountered that issue, too. In my case, I didn't have the term definition installed on my machine. I followed the steps here and the glitching was resolved. |
Hmmm, so I did have a terminfo entry for wezterm installed as part of the ncurses package (a wezterm terminfo entry was added in 6.5). But that entry seems to be different from the entry I get from the instructions for installing it locally. If I do follow those instructions it seems to fix the issue. If I use infocmp to compare the terminfo entries from ncurses, and the wezterm source respectively, I get the following differences:
So maybe a bug should be reported to ncurses? I'm willing to do it, but it might be better if someone more familiar with terminfo databases and/or a member of the wezterm project is at least included in the conversation. |
The location of the left margin should depend on the width, not the height. Fixes: wez#5750
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
What Operating System(s) are you seeing this problem on?
Linux Wayland
Which Wayland compositor or X11 Window manager(s) are you using?
Mutter + Zellij
WezTerm version
20240203-110809-5046fc22
Did you try the latest nightly build to see if the issue is better (or worse!) than your current version?
Yes, and I updated the version box above to show the version of the nightly that I tried
Describe the bug
When setting
term = wezterm
in config and using Zellij as multiplexer if one creates a vertical split in neovim scrolling in one buffer causes the other buffer's text to become garbled and corrupted and eventually disappear.I realize there are a lot of potential culprits here and I've tried as best I can to isolate what may be contributing the unexpected behavior. To wit, not setting the term to wezterm and instead using the default xterm-256color does not cause the reported issue in Zellij + neovim. In fact Wezterm with wezterm terminfo without Zellij does not cause the reported behavior. My impression is that this may have something to do with the wezterm terminfo and how it interacts with Zellij and/or neovim. What gives me hope that it may be able to be addressed is that foot for instance has it's own custom terminfo foot-extra that works as expected with Zellij + neovim.
So far, I've tested the following terminals with the listed TERM settings and also did not experience the corrupted buffer text.
The terminals I tested where the issue did not present itself: (terminal/TERM)
To Reproduce
To reproduce:
Attached a short screen capture of the behavior for reference.
zellij_neovim_vertical_split_scroll_issues.mp4
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.
Configuration
Expected Behavior
Scrolling in wezterm + zellij + neovim vertically split window does not corrupt text in opposite buffer.
Logs
Attached is output from
WEZTERM_LOG=wezterm_gui=debug,info wezterm >> log_file.txt 2>&1
(because otherwise debug for all modules is a huge file/output)log_file.txt
Anything else?
No response
The text was updated successfully, but these errors were encountered: