-
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
Exception when switching buffer after resize #842
Comments
Obviously this happens because the renderer assumes that the dimensions of the normal buffer is in sync with the rows / cols, but it isn't. I think we have to adjust the size of a buffer to the current dimensions when activating it -- and before the renderer touches it. |
Can reproduce with vim and 40x40 |
It appears to only happen when the normal buffer isn't filled. |
Yeah it's related to not filling in the |
Related to #510. I think when BufferSet was added, checks were removed so we no longer clear the normal buffer when resizing in the alt buffer. Apparently we missed this one case. |
Here's the line that prevented this: https://github.com/sourcelair/xterm.js/pull/717/files#diff-d4f745d6f29faa0617f2e02bb95f0c44L2039 |
The same also breaks when rows change in the other direction, the scrollbar shows there is more content but you can't scroll it (because they're blank lines). |
Obscure bug I ran into while coming up for a fix here. after |
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
You're a genius, thanks @Tyriar! |
Hey, I just thought I'd report that I'm still having this issue with the 2.9.1 release of xtermjs. Right after I call |
Problem
An exception is thrown (latest master and probably before) if we resize the screen to a bigger dimension while being in the
alt
screen buffer. Once thealt
screen buffer exists and we switch back to thenormal
buffer, the exception will show up, and the terminal will stop working (blank screen).I think this has the same root cause as #838 and likely others where the line or row data is an
undefined
reference.How to reproduce
vim
)Demo
The text was updated successfully, but these errors were encountered: