Clear state when resizing as canvases get cleared

This commit is contained in:
Daniel Imms
2017-09-02 21:13:44 -07:00
parent 7973b26e7a
commit 8427f7490d
5 changed files with 27 additions and 0 deletions
+2
View File
@@ -16,6 +16,8 @@ export class ForegroundRenderLayer extends BaseRenderLayer {
public resize(terminal: ITerminal, canvasWidth: number, canvasHeight: number, charSizeChanged: boolean): void {
super.resize(terminal, canvasWidth, canvasHeight, charSizeChanged);
// Resizing the canvas discards the contents of the canvas so clear state
this._state.clear();
this._state.resize(terminal.cols, terminal.rows);
}