-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Fix session restoration of full buffers #17654
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO the outcome should be that H-4 lines of the reloaded buffer get pushed off the top of scrollback and lost; what does this change result in?
Oh, good point. I should not move the viewport but rather print newlines and then CUP up. Edit: No wait, we can't, because once we persist the buffer accurately, including trailing whitespace, those newlines will also get persisted. It must be viewport panning! Hmmmm... Perhaps we have to change the renderer to support out of bounds viewports. But that may be a future improvement. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(Lodging my review)
We talked about it and decided to just show as much scrollback as possible, since the popups in cmd now use VT. |
0d78d84
to
e7527ac
Compare
{ | ||
_terminal->Write(L"\r\n"); | ||
} | ||
_terminal->Write(message); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moving it into the loop allows us to reuse the console lock that we've already acquired.
This removes the
Terminal::SetViewportPosition
call from sessionrestoration which was responsible for putting the viewport below
the buffer height and caused the renderer to fail.
In order to prevent such issues in the future,
SetViewportPosition
now protects itself against out of bounds requests.
Closes #17639
Validation Steps Performed
big.txt