-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Windows Terminal text glitches when using vim ! #6865
Comments
You didn't list any other software.
|
yes i'm using Vim version 8.1 that runs inside WSL 2 (Ubuntu 20.04 ) and i'm not using SSH. |
After some windows updates it seems like the issue has gone so i will close this Issue. |
Problem still exits It's been months now and I haven't found a solution for this problem. The only think that I can do is close and open windows terminal app. |
Are you using any sort of vim plugins?
That seems like a bit of an aggressive solution - does just closing an re-opening vim reset the buffer to something reasonable? |
This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. |
I'm experiencing the same issues with both vim and neovim. Opening a split and scrolling up/down causes serious visual issues. |
Scrolling up and down is a killer. Have to figure this out cause this kills using WSL completely. |
This comment has been minimized.
This comment has been minimized.
@kvnmlm we closed this since we couldn't get more feedback from OP, but if you like to help debug:
Also:
|
Stepping in to answer: this happens both in vim and neovim, and doesn't require plugins, though it's more apparent with various plugins. The contents of the buffer all glitch out to various degrees. This is a showstopper from the perspective of my workflow, which is why I didn't bother sticking with Windows Terminal once I realized it was a terminal-specific issue and not a WSL2 one. |
Well, we'd love to help figure that out! Curious that we haven't heard more reports of this - you'd think that a pretty major bug like that would have more reports if it was more widespread. Is there anything else interesting about your setup? What shell are you using? Maybe you're running Is there a specific set of steps that repros this consistently (ideally from an initially empty |
Hmm. Trying to make the bugs appear again, I'm not having success. I do use vim in zsh and tmux, but I switched away from Windows Terminal several Windows Update cycles ago, as well as updating my laptop video drivers to the latest from Intel. I'll switch back to Windows Terminal and see if it comes back and report here if it does. |
No, WSL on my machine. New to using WSL, cygwin user for years. At first windows terminal looked nice but it tailed off pretty quickly. I live in putty sshed into linux boxes daily using tmux most of the time. Love putty, tolerate tmux.
Trying at the moment and it is working normally. Very strange cause last night everything I touched was hosed. Will use it throughout the evening and report back when I break it. I'll ditch my very simple .vimrc after it breaks again. EDIT, ADDING:
Don't believe so. New machine, building up dev environment though most work in sshed to linux boxes.
|
Further debug dropping .vimrc and then going after the cursor line. This is the .vimrc line which kills it:
Removing it seems to fix things. Time will tell if that is the root but looks that way to me at moment. So, to test, I deleted .vimrc again so the cursorline and whole vimrc. Was going to set cursorline and see if it comes back. When I open a non-existent ~/.vimrc I get the strange tildes all over the place. When I edit any file which doesn't exist, I get the tilde thing. Tried on a linux box, centos at my fingertips, editing vim a non-existent file very nicely opens and then lets you create a file. Tried ubuntu on linux box, works great. |
Sad that this occurs so often, it is a pain to work with vim/NeoVim with windows terminal, here is my vimrc and I keep facing the same glitched text issue, where the text sometimes appears on the signcolumn, or sometimes gets misplaces when using splits. |
I'm glad I'm not the only one after seeing so many people praise Window Terminal. This is my terminal with tmux open after having closed neovim. I ran a bunch of git commands but there were a bunch of artifacts that remained from vim. When my terminal is in this state, even Windows Terminal is my favorite balance of speed and aesthetics, but this issue makes it entirely unusuable for me for my vim/tmux workflow. |
Here's another example of me opening up a popup/float window using COC in Neovim while using tmux. It renders totally incorrectly, appearing to wrap around to the other tmux pane. Again, no problems with this using other terminals, even when connected to the same tmux session. Here's a screenshot of the same section in Hyper: Note that after this happens, my Windows Terminal will gradually leave more artifacts like the one pictured in my comment above until I kill tmux. |
... Maybe, maybe not though. Let's be sure about that. @Aadv1k thanks for sharing your vimrc - could I get a couple other pieces of info, just to narrow things down?
Cause like, look at this snippet: What's that red box char there? Maybe that's something that's ambiguous width, and what's confusing conpty here. The following line has the artifact on it, so maybe that triggered it. I'm tempted to close this thread and punt back to #6987. OP is MIA so I can't really get any more info to debug from them. The second artifact in this issue looks like #9359, but that poster has stopped using the Terminal so it's gonna be hard to get more info from them |
To answer your questions line by line;
Nope, this is Ubuntu 20.04 running on wsl2
No, it even happens without tmux, the main culprit seems to be vim's navigations and splits here which cause the tearing
Sorry for not specifying but I am not using vim at all I am using
Open any file, and then just start navigating around, open vertical splits, horizontal splits, navigate across the file, that's pretty much it, there aren't any "steps" this just happens while navigating, even worse when using
That is actually my lsp, I use nvim-lspconfig tearing never usually happens around my lsp, such issues happen around the signcolumn and/or the number column. I really hope this is resolved as it is really a pain to not be able to use such a great terminal like windows terminal. |
I'm aware that this is gonna sound super annoying, but do you have a specific set of steps that repros this 100%? I mean an exact "open this .scss file, scroll to line 80, open a new vertical split, then open nerdtree with |
This is the strangest part about this, there really aren't any steps that can reproduce this exactly, it just randomly occurs, I try to document whenever it does happen, so I will update. For the most part, having |
I won't be writing any further comments here as the issue might not be windows terminal at all, I have been using it extensively and no issues, at least for now. |
Yep, that sounds like #6987 alright. As mentioned, I'm gonna close this second half of the discussion as a /dupe of #6987. If folks find this thread and DO have a consistent way to repro, then I'm all ears over in that thread. If you see some other rendering glitch in vim that looks different, then let's start a new thread. |
Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report! |
I propose reopening this issue. I don't think this is a duplicate of #6987. I'm seeing screen corruption with VIM in Windows Terminal (WT) immediately upon startup of VIM and am NOT using tmux. I've determined that it has something to do with VIM not getting the proper screen width from WT. The most obvious indicator that this is happening is that the tail end of the VIM status bar get's wrapped to an added screen line. For example, the tail end of the status bar might indicate the cursor is on line 141, column 1, 74% through the file with this at the tail end: "141,1 74%". What happens is "41,1 74%" gets wrapped to a new line on the screen. Any scrolling causes more wrapping lines to appear at the bottom of the WT window. I've found 2 cumbersome workarounds for now:
Performance is normal after that. |
Adding to this, for some reason even after setting padding to be 0, there is still a thin border at bottom and left of the windows terminal screen, doesn't go in full screen |
@EnGamma That sounds like a different bug than this one - mind filing a new issue? @Aadv1k That too is a different issue - in your case, the space that's there on the bottom of the window isn't big enough for an entire row of text, so we just fill it with blank space. That's generally preferable to a row of characters that's only partially visible. Otherwise, the only solution would be to prevent the window from filling the entire screen while maximized, which I'm sure that no one really wants. See also #6021 |
I'm facing the text glitches without tmux. (with neovim v0.7.2) left: Windows Terminal 1.14.1963.0 Video.mp4When I move the cursor around the virtual texts, the texts below shift by one line. Should I open another issue for this, or this issue should be reopened? |
What you are seeing was also a symptom I experienced due to my trying to
set screen dimensions in my vimrc file. The apparent cursor position was
different from actual which became evident when scrolling or typing which
would insert text in wrong place.
My particular problem was fixed by not trying to set screen dimensions in
vimrc.
|
This issue seems to be on and off pretty regularly. From this thread and expereinces - this specific issue is caused in neovim configured with LSP or similar derivates that make use of signcolumns. The issue is ususally find alongside
NOTE: This is merely an observation from the long threads above, and includes some of my own experiences as well. |
@mj-hd That looks like a different issue than the one tracked at the start of this thread. I'd file a new issue, and make sure to include your vimrc / any other relevant config. |
Ok, thank you. I will check my vimrc and fonts to avoid these glitches, then open a new issue if the glitches still exist. |
I also have glitches in neovim and helix editor. I am sure it's not a misconfiguration, but a Windows terminal issue. |
Not sure if this is the same issue, but glitches start occurring for me only after running a terminal process within Vim. Once a process is running, the glitches slowly start occurring everywhere - and keep occurring even after quitting the process. The glitches take a while to creep in, but can be triggered instantly by opening a floating window: glitches.mp4 |
Environment
The text was updated successfully, but these errors were encountered: