-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Resizing the terminal while in the alt buffer will break the normal buffer #510
Comments
This is not as trivial as it looks. It's happening because the normal buffer is cleared in resize, this is done because without doing this it doesn't get resized which causes a lot of issues if the rows were reduced. |
I noticed this when I was looking through the code the other day. When the alt screen buffer is created, the normal screen buffer is backed up to InputHandler.ts - creating the alternate buffer But still, given the way the alt buffer is replaced by normal buffer, how can there still be any content from the alt buffer making its way back to the normal buffer? I assume this happens because we do not call |
|
This brings in proper support to resize both buffers (xtermjs#510) and fixes an exception that was caused by wrongfully not clearing the normal buffer when resizing while the alt buffer is active. There was an obscure bug in this that could have caused some great confusion later on; When switching to the alt buffer, a hard terminal reset was performed which tried to retain the buffers. However, because buffers was initialized in the Terminal constructor to a new BufferSet, the Terminal.buffer convenience pointer was pointing at a stale alt buffer which was the one actually being used, not Terminal.buffers.alt. Fixes xtermjs#842 Fixes xtermjs#510
Downstream issue microsoft/vscode#19385
Steps to reproduce
ls -l
:q
ls
, good:q
ls
.The text was updated successfully, but these errors were encountered: