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

Previous command disappears from the terminal output when it fills the current terminal height #12805

Closed
danilaml opened this issue Apr 1, 2022 · 9 comments
Labels
Area-Rendering Text rendering, emoji, complex glyph & font-fallback issues Help Wanted We encourage anyone to jump in on these. Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Attention The core contributors need to come back around and look at this ASAP. Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Priority-2 A description (P2) Product-Conpty For console issues specifically related to conpty
Milestone

Comments

@danilaml
Copy link

danilaml commented Apr 1, 2022

Windows Terminal version

1.11.3471.0

Windows build number

10.0.19043.0

Other Software

No response

Steps to reproduce

I've first discovered this issue in VS Code and described it (with the gifs and steps to reproduce) here: microsoft/vscode#146450
I was able to reproduce it in the latest Windows Terminal.

Expected Behavior

When scrolling back the command output is delimited by the commands themselves.
image

Actual Behavior

The problematic command disappears from the output, "merging" the two commands stdout together (in the images below the output after the empty line was generated by python -c "print('foo\n' * 27)").
image
image

@danilaml danilaml added the Issue-Bug It either shouldn't be doing this or needs an investigation. label Apr 1, 2022
@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 Apr 1, 2022
@zadjii-msft
Copy link
Member

What do you have in your PowerShell profile?

@danilaml
Copy link
Author

danilaml commented Apr 1, 2022

@zadjii-msft path returned by $profile doesn't seem to exist so I assume nothing. Note, that I wasn't able to reproduce this issue in the standalone powershell (makes sense, if it's conpty issue). I've tested on two different machines too (same Win version).

@zadjii-msft
Copy link
Member

This is crazy, and I can't seem to repro this at all, despite the repro steps being pretty straightforward. If this were a conpty issue, then maybe we fixed it between 1.11 and 1.15? But nothing immediately comes to mind...

@danilaml
Copy link
Author

danilaml commented Aug 12, 2022

I can still reproduce it in Terminal 1.14.1962.0 (and different versions of VS Code) and Windows 10.0.19044.0 on several machines. Make sure that the output of the command is exactly long enough for the executed command to be at the topmost line after it's done.

@zadjii-msft
Copy link
Member

Maybe it's a timing thing then? Cause I couldn't get this to repro even on a 1.10 build of the Terminal. Maybe it really needs all the output to come in a single conpty frame, and my hardware is just too fast for that.

@zadjii-msft zadjii-msft added Product-Conpty For console issues specifically related to conpty Priority-2 A description (P2) labels Aug 15, 2022
@zadjii-msft zadjii-msft added this to the Backlog milestone Aug 15, 2022
@zadjii-msft zadjii-msft added Help Wanted We encourage anyone to jump in on these. Area-Rendering Text rendering, emoji, complex glyph & font-fallback issues labels Aug 15, 2022
@ghost ghost removed the Needs-Tag-Fix Doesn't match tag requirements label Aug 15, 2022
@danilaml
Copy link
Author

danilaml commented Aug 15, 2022

Are you testing on Win10? Is HW acceleration enabled (I haven't verified that it is or not in my case, but I assume it's the same across the board since I haven't changed any defaults)? There is no timing at play, as far as I can tell. I can wait 10-15 seconds between running commands and the result is the same. The reproducibility rate is 100%. I've also run it on 3 reasonably powerful machines (2-core HT ultrabook, 6-core HT laptop and 4-core Desktop). Is there anything else I can provide to help move this issue?

@zadjii-msft
Copy link
Member

Hey we think this might be a known issue in older versions of PsReadline: PowerShell/PSReadLine#724

Does this repro if you Remove-Module PsReadline (or update it) (or just run the command from a Command Prompt profile)/?

I can't believe I didn't catch that before!

@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something label Aug 9, 2023
@danilaml
Copy link
Author

danilaml commented Aug 9, 2023

@zadjii-msft hi. PSReadline seems to be impossible to remove from my machine (or to cleanly update due to name change for that matter) and I don't know if I can safely delete its folder in C:\Program Files\WindowsPowerShell\Modules but after I've installed 2.2.6 side-by-side it seems to have gone away (unable to reproduce).

@microsoft-github-policy-service microsoft-github-policy-service bot added Needs-Attention The core contributors need to come back around and look at this ASAP. and removed Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something labels Aug 9, 2023
@zadjii-msft
Copy link
Member

Well that sure is wacky! Alas, I'm not the powershell expert so I can't help with that, but hey, glad it went away?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Rendering Text rendering, emoji, complex glyph & font-fallback issues Help Wanted We encourage anyone to jump in on these. Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Attention The core contributors need to come back around and look at this ASAP. Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Priority-2 A description (P2) Product-Conpty For console issues specifically related to conpty
Projects
None yet
Development

No branches or pull requests

2 participants