Skip to content
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

The Terminal loses lines of history #10975

Closed
TishSerg opened this issue Aug 18, 2021 · 5 comments
Closed

The Terminal loses lines of history #10975

TishSerg opened this issue Aug 18, 2021 · 5 comments
Labels
Needs-Tag-Fix Doesn't match tag requirements Resolution-External For issues that are outside this codebase

Comments

@TishSerg
Copy link

TishSerg commented 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

@ghost ghost added Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Tag-Fix Doesn't match tag requirements labels Aug 18, 2021
@DHowett
Copy link
Member

DHowett commented Aug 18, 2021

Thanks for the report! This sounds suspiciously similar to /dup PowerShell/PSReadLine#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. 😄

@ghost
Copy link

ghost commented 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 ghost closed this as completed Aug 18, 2021
@ghost ghost added Resolution-External For issues that are outside this codebase and removed Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels Aug 18, 2021
@TishSerg
Copy link
Author

TishSerg commented 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

@zadjii-msft
Copy link
Member

How to update psreadline

@TishSerg
Copy link
Author

How to update psreadline

Thank you

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs-Tag-Fix Doesn't match tag requirements Resolution-External For issues that are outside this codebase
Projects
None yet
Development

No branches or pull requests

3 participants