After some operation there are some ghost char and cannot be deleted by clear screen #16127

Closed
opened 2026-01-31 04:58:17 +00:00 by claunia · 5 comments
Owner

Originally created by @SigmaStar on GitHub (Dec 15, 2021).

Windows Terminal version

1.11.2921.0

Windows build number

10.0.22000.348

Other Software

vim 8.2 with airline
posh for windows amd64 5.2.1
powershell 7.2.0

Steps to reproduce

  1. Run vim from Powershell
  2. executing :read !dir
  3. maximize Windows Terminal
  4. quit vim with :q!

Expected Behavior

the window of the Windows Terminal should be clear and if I run vim again it should be ok.

Actual Behavior

The lower part of Windows Terminal is still the content of closed vim and vim cannot be run again because the content is shuffled.
image

Originally created by @SigmaStar on GitHub (Dec 15, 2021). ### Windows Terminal version 1.11.2921.0 ### Windows build number 10.0.22000.348 ### Other Software vim 8.2 with airline posh for windows amd64 5.2.1 powershell 7.2.0 ### Steps to reproduce 1. Run vim from Powershell 2. executing :read !dir 3. maximize Windows Terminal 4. quit vim with :q! ### Expected Behavior the window of the Windows Terminal should be clear and if I run vim again it should be ok. ### Actual Behavior The lower part of Windows Terminal is still the content of closed vim and vim cannot be run again because the content is shuffled. ![image](https://user-images.githubusercontent.com/22829962/146142933-961d69f0-9928-4fa4-8078-e11e195d5e42.png)
Author
Owner

@SigmaStar commented on GitHub (Dec 15, 2021):

Again, a new vim instance looks like this:
image

@SigmaStar commented on GitHub (Dec 15, 2021): Again, a new vim instance looks like this: ![image](https://user-images.githubusercontent.com/22829962/146143116-478fcebc-f390-4856-93b0-77e6a063cff7.png)
Author
Owner

@zadjii-msft commented on GitHub (Jan 3, 2022):

This looks a bit like #202, even though that one's years older than the Terminal (or even conpty). I suspect there's a better dupe somewhere else on the repo.

I'd bet that this is due to windows vim.exe using another screen buffer to host the vim buffer, and when you exit vim, it restores the original screen buffer, which is still at a different size. When running as conpty, we probably shouldn't have different screen buffer sizes like that. We should probably keep them in sync manually. (or at very worst, sync the size of the second buffer to the first buffer when closing the second buffer)

@zadjii-msft commented on GitHub (Jan 3, 2022): This looks a bit like #202, even though that one's years older than the Terminal (or even conpty). I suspect there's a better dupe somewhere else on the repo. I'd bet that this is due to windows vim.exe using another screen buffer to host the vim buffer, and when you exit vim, it restores the original screen buffer, which is still at a different size. When running as conpty, we probably shouldn't have different screen buffer sizes like that. We should probably keep them in sync manually. (or at very worst, sync the size of the second buffer to the first buffer when closing the second buffer)
Author
Owner

@notalexnot commented on GitHub (Jan 6, 2022):

Same here. Although it doesn't happen very often, but it can be annoying

Windows Terminal version

1.12.3472.0 (Preview)

Windows build number

19043.1415

Other Software

  • Vim 8.2.3908
  • Powershell 7.2.1

I censored the content since I wrote some personal information.
imagen

@notalexnot commented on GitHub (Jan 6, 2022): Same here. Although it doesn't happen very often, but it can be annoying ### Windows Terminal version 1.12.3472.0 (Preview) ### Windows build number 19043.1415 ### Other Software - Vim 8.2.3908 - Powershell 7.2.1 I censored the content since I wrote some personal information. ![imagen](https://user-images.githubusercontent.com/43765089/148351931-66ed1163-b322-4ae4-8dff-c0e19494859a.png)
Author
Owner

@zadjii-msft commented on GitHub (Jan 18, 2022):

Hey look, I found the dupe!

/dup #4389

@zadjii-msft commented on GitHub (Jan 18, 2022): Hey look, I found the dupe! /dup #4389
Author
Owner

@ghost commented on GitHub (Jan 18, 2022):

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!

@ghost commented on GitHub (Jan 18, 2022): 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!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#16127