wezterm
wezterm copied to clipboard
wezterm terminfo leads to corrupted buffer text when scrolling in zellij + neovim vertical split
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)
- Foot with foot-extra TERM env var
- Sakura with xterm-256color TERM env var
- Kitty with xterm-kitty env var
- Wezterm with xterm-256color TERM env var
To Reproduce
To reproduce:
- run wezterm with term set to wezterm in config
- run zellij with default settings.
- run development version of neovim also in a clean state with no plugins loaded (i.e. nvim --clean -u NONE -i NONE)
- open any file
- create a vertical split
- 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.
https://github.com/wez/wezterm/assets/21365869/9bd6e933-bac7-4ae2-8128-744d7a12f8ac
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
local wezterm = require("wezterm")
local mux = wezterm.mux
wezterm.on("gui-startup", function(cmd)
local tab, pane, window = mux.spawn_window(cmd or {})
window:gui_window():toggle_fullscreen()
end)
return {
font = wezterm.font_with_fallback({
"Jet Brains Mono",
"Noto Sans Symbols2",
}),
term = "wezterm",
enable_wayland = true,
hide_tab_bar_if_only_one_tab = true,
default_cursor_style = "BlinkingBlock",
window_padding = {
left = 0,
right = 0,
top = 0,
bottom = 0,
},
window_background_opacity = 1.0,
color_scheme = "selenized",
}
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