Resize both buffers on resize

This brings in proper support to resize both buffers (#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 #842
Fixes #510
This commit is contained in:
Daniel Imms
2017-08-05 18:59:44 -07:00
parent f5ba386c01
commit 3d20c2f266
4 changed files with 94 additions and 82 deletions
+1
View File
@@ -48,6 +48,7 @@ export interface ITerminal {
emit(event: string, data: any);
reset(): void;
showCursor(): void;
blankLine(cur?: boolean, isWrapped?: boolean);
}
export interface IBuffer {