The Terminal loses lines of history #14901

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

Originally created by @TishSerg on GitHub (Aug 18, 2021).

Windows Terminal version (or Windows build number)

1.9.1942.0 (@ Microsoft Windows [Version 10.0.19043.1165])

Other Software

No response

Steps to reproduce

Finally, I caught a simple reproducible manifestation of this annoying bug, and finally, I'm opening this issue here. That freaks me out for a long time.

  1. Open new Windows PowerShell tab
  2. Enter command: wsl --help
  3. Copy all the text to one of the sides of your favorite diff application
  4. Enter command: wsl --list
  5. Enter command: wsl --list --verbose
  6. Copy the same text to another side of your favorite diff application
  7. See the Terminal have lost a couple of lines

I did some investigation for you, msft guys. Here are some discovered facts:

  • The lost lines are the same every time if the Terminal viewport has the same height.
    If you change viewport height, then a different couple of lines will be lost (but still with 2 preserved lines between them). Example for viewport of ~35 lines height (maybe ±few, I counted manually):
    image

  • After reading this post I decided to test if the Legacy Command-line tab has the same issue. So: it doesn't. The legacy cmd tab works as expected.

  • How about an Ubuntu tab? The same as the Legacy cmd tab. Doesn't lose lines.

Further investigation is yours, msft guys. Have nice bug hunting ;)

P.S. Looks like after these discoveries I going to use the Legacy Command-line tab more ¯_(ツ)_/¯

Expected Behavior

The scrollback doesn't lose random lines of text

Actual Behavior

Some lines are lost from scrollback buffer history

Originally created by @TishSerg on GitHub (Aug 18, 2021). ### Windows Terminal version (or Windows build number) 1.9.1942.0 (@ Microsoft Windows [Version 10.0.19043.1165]) ### Other Software _No response_ ### Steps to reproduce Finally, I caught a simple reproducible manifestation of this annoying bug, and finally, I'm opening this issue here. That freaks me out for a long time. 1. Open new Windows PowerShell tab 2. Enter command: `wsl --help` 3. Copy all the text to one of the sides of your favorite [diff application](https://editor.mergely.com/) 4. Enter command: `wsl --list` 5. Enter command: `wsl --list --verbose` 6. Copy the same text to another side of your favorite [diff application](https://editor.mergely.com/) 7. See the Terminal have lost a couple of lines I did some investigation for you, msft guys. Here are some discovered facts: - The lost lines are the same every time if the Terminal **viewport has the same height**. If you change viewport height, then a different couple of lines will be lost (but still with 2 preserved lines between them). Example for viewport of ~35 lines height (maybe ±few, I counted manually): ![image](https://user-images.githubusercontent.com/11420785/129905496-505063d0-8a41-4f84-9f10-6657a41bcdd5.png) - After reading [this post](https://github.com/microsoft/terminal/issues/3490#issuecomment-577744137) I decided to test if the Legacy Command-line tab has the same issue. So: **it doesn't**. The legacy cmd tab works as expected. - How about an Ubuntu tab? The same as the Legacy cmd tab. Doesn't lose lines. Further investigation is yours, msft guys. Have nice bug hunting ;) P.S. Looks like after these discoveries I going to use the Legacy Command-line tab more ¯\_(ツ)_/¯ ### Expected Behavior The scrollback doesn't lose random lines of text ### Actual Behavior Some lines are lost from scrollback buffer history
claunia added the Resolution-ExternalNeeds-Tag-Fix labels 2026-01-31 04:22:47 +00:00
Author
Owner

@DHowett commented on GitHub (Aug 18, 2021):

Thanks for the report! This sounds suspiciously similar to /dup https://github.com/PowerShell/PSReadLine/issues/724

The old version of PSReadline that came with Windows PowerShell uses a "hard scroll" operation when the prompt is displayed. This "hard scroll" deletes the content that was scrolled off the screen.

If you can update PSReadline -- or perhaps even better -- upgrade to PowerShell 7, this issue should be thoroughly defeated. 😄

@DHowett commented on GitHub (Aug 18, 2021): Thanks for the report! This sounds suspiciously similar to /dup https://github.com/PowerShell/PSReadLine/issues/724 The old version of PSReadline that came with Windows PowerShell uses a "hard scroll" operation when the prompt is displayed. This "hard scroll" deletes the content that was scrolled off the screen. If you can update PSReadline -- or perhaps even better -- upgrade to PowerShell 7, this issue should be thoroughly defeated. :smile:
Author
Owner

@ghost commented on GitHub (Aug 18, 2021):

Hi! We've identified this issue as a duplicate of one that exists on somebody else's Issue Tracker. Please make sure you subscribe to the referenced external issue for future updates. Thanks for your report!

@ghost commented on GitHub (Aug 18, 2021): Hi! We've identified this issue as a duplicate of one that exists on somebody else's Issue Tracker. Please make sure you subscribe to the referenced external issue for future updates. Thanks for your report!
Author
Owner

@TishSerg commented on GitHub (Aug 19, 2021):

update PSReadline

How to do that?

PSReadline version: 2.0.0-beta2
os: 10.0.19041.1 (WinBuild.160101.0800)
PS file version: 10.0.19041.1 (WinBuild.160101.0800)
HostName: ConsoleHost (Windows Terminal)
BufferWidth: 148
BufferHeight: 35
@TishSerg commented on GitHub (Aug 19, 2021): > update PSReadline How to do that? ```PS version: 5.1.19041.1151 PSReadline version: 2.0.0-beta2 os: 10.0.19041.1 (WinBuild.160101.0800) PS file version: 10.0.19041.1 (WinBuild.160101.0800) HostName: ConsoleHost (Windows Terminal) BufferWidth: 148 BufferHeight: 35 ```
Author
Owner

@zadjii-msft commented on GitHub (Aug 19, 2021):

How to update psreadline

@zadjii-msft commented on GitHub (Aug 19, 2021): [How to update psreadline](https://github.com/PowerShell/PSReadLine#upgrading)
Author
Owner

@TishSerg commented on GitHub (Aug 20, 2021):

How to update psreadline

Thank you

@TishSerg commented on GitHub (Aug 20, 2021): > [How to update psreadline](https://github.com/PowerShell/PSReadLine#upgrading) Thank you
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#14901