-
Notifications
You must be signed in to change notification settings - Fork 8.4k
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
VIM Screen Corruption #13441
Comments
I think the issue here is just that you've configured VIM to request a specific screen size, and Windows Terminal doesn't support that. It looks fine to me if I comment out this line:
Unless there is some other problem that I'm missing, this looks to me like a duplicate of #5094. |
That's exactly it. /dup #5094 |
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! |
Thank you, fix confirmed on my system. Do you know if there is a way for
VIM to detect Windows Terminal so that I can make that setting conditional?
|
if !empty($WT_SESSION)
...
endif |
Windows Terminal version
1.13.11431.0
Windows build number
10.0.19043.1766
Other Software
vim 8.2 in Windows Terminal WSL (both Ubuntu and Debian variants)
Debian:
VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Oct 01 2021 01:51:08)
Included patches: 1-2434
Extra patches: 8.2.3402, 8.2.3403, 8.2.3409, 8.2.3428
Ubuntu:
VIM - Vi IMproved 8.1 (2018 May 18, compiled Feb 01 2022 09:16:32)
Included patches: 1-2269, 3612, 3625, 3669, 3741
vimrc.txt
Steps to reproduce
Start VIM, look to bottom of screen, see that the tail of the VIM status bar text is wrapped to the next screen line.
Alternatively, have VIM open a new file or a file of only a few lines that will not fill the screen vertically with lines. The normally line-leading tildes ~ are scattered across the screen instead of at the left edge [note that this happens only in a non-full-screen window. In full screen it appears normal.]
.
Expected Behavior
Windows Terminal => VIM screen width communicated reliably at startup, no wrapping of status bar, no further corruption as scrolling causes more of the wrapped text to fill bottom of screen, no misalignment of visible line text with underlying line #.
Actual Behavior
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.
Also, if editing a file of only a few lines, VIM fills the screen below with lines starting with a tilde ~. If you open such a file, the ~ are scattered across the screen.
The corruption seems to persist even after exiting back to shell prompt (i.e., the shell prompt is invisible after a ^L and becomes visible again only after pressing [ENTER]).
I've found 2 cumbersome workarounds for now:
Resize the terminal widow or
Toggle full screen [F11] [F11] or [ALT]-{ENTER] [ALT]-[ENTER]
Performance is normal after that.
The text was updated successfully, but these errors were encountered: