-
-
Notifications
You must be signed in to change notification settings - Fork 832
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 Mux Server causes weird line artifacts in neovim #4607
Comments
I have the same issue with the release version of wezterm. This issue was caused by an update to neovim, I am currently bisecting which commit caused it. I also cannot reproduce the issue with |
This issue was introduced by neovim/neovim@ac8ed77. Neovim now supports synchronized output. Apparently, wezterm is supposed to support this. I was wrong about this being related to plugins, they just make it more obvious. So either the neovim implementation of this is wrong, which I don't think since it works outside the mux environment, or there is an issue with this in the mux environment in wezterm. As a workaround, you can just disable this in neovim: PS: Don't update your main editor to the newest nightly and then bisect some breaking change, when you actually have a work deadline coming up. Don't ask me how I know. |
Turning off |
Same issue here, thx for the workaround. |
I'm facing the same issue. Unfortunately, the workaround doesn't work for me. I'll provide more information later. |
Can confirm, although this time around I did not yet have the time to fully investigate. However what I can confirm is, that the issue turns up even before Simple steps to reproduce:
The last point also prevented me from noticing this, as something in my plugins keeps the lower half of the screen updated, though I did not yet have the time to bisect my plugins. Maybe someone with more time could either try to figure out what changed so we can disable this again, or even try to figure out how to fix termsync in wezterm mux. |
I have the same problem with Kakoune. |
I finally had the time to bisect the issue to d36ad7c, particularly reverting the change here wezterm/wezterm-mux-server-impl/src/sessionhandler.rs Lines 103 to 112 in d36ad7c
Edit: Changing that part back does not fix the issue completely, but atleast with |
So what I've been seeing in total was lines not getting updated properly and also lines moving around, as in this demo. Note the line numbers in the beginning. wezterm_bug_demo.mp4All of these troubles were not that obvious and consistent in my day to day setup but are easily and consistently reproducible with OP's config and Turns out, there is two issues at play here. The regular artifacts (lines not updating properly) are due to a race condition, which also explains why they didn't appear all the time and were way worse with The other issue, were lines broke when scrolling in neovim (also tested in regular vim, just to make sure it's not just a neovim issue) was harder to find and I'm not completely sure what set of conditions has to be met for it to be visible, but apparently the viewport moved down and a scrollback built up even when there should not be a scrollback (for example in alternate screen mode). I think I fixed it in #6099. With both those commits I don't see any glitches anymore. |
As far as I can tell this issue can be closed now. Maybe some of the others in this thread also want to confirm. |
I haven’t tried, give me a couple of minutes to build a local version of wezterm and test with Kakoune. |
@hadronized you can also just install nightly. Both fixes have been merged. |
Yeah, I don’t see issues anymore. Sounds okay to me! |
What Operating System(s) are you seeing this problem on?
Linux X11
Which Wayland compositor or X11 Window manager(s) are you using?
KDE Plasma WM
So this is a weird one. After updating to the most recent nightly, I have noticed that while using neovim, I will often see lines being blank, in the wrong place, shifting around as I move the cursor throughout a file, etc.
I was able to verify this is a Wezterm issue and not a neovim issue by using neovim in several different terminals with the same neovim configuration. I have tested this in the following terminals
In all cases, neovim performs as expected. However if I use a unix domain, suddenly I see weird artifacts when navigating a file. Below is a video of this
https://github.com/wez/wezterm/assets/2640668/ac9ea99a-b05b-443b-9f6a-41e7069a48a8
And here is a video showing me using wezterm with the same file without the mux server.
https://github.com/wez/wezterm/assets/2640668/f297228f-1986-4ab6-8668-a600b5dbeb1f
I have no idea what is going on. Help?
WezTerm version
20231120-164150-fde92672
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
There are line artifacts happening when using neovim within the wezterm mux server
To Reproduce
To make life as easy as possible, below is a bash script that can be used to get you into a similar state as what I was seeing (hopefully)
Configuration
Expected Behavior
I would expect my terminal to properly render the lines as they are shown
Logs
22:07:59.752 WARN wezterm_client::client > While connecting to Socket("/run/user/1000/wezterm/sock"): connecting to /run/user/1000/wezterm/sock. Will try spawning the server.
22:07:59.752 WARN wezterm_client::client > Running: "/usr/bin/wezterm-mux-server" "--daemonize"
Anything else?
I notice this kind of artifacting behavior gets even worse if I put splits in my neovim configuration. This all started happening today after an update to the latest wezterm nightly. I don't know what version I was running prior unfortunately :(
The text was updated successfully, but these errors were encountered: