From d26a64372745e297278c9ddf2c332d0665660b6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Breitbart?= Date: Sun, 7 Jul 2019 20:45:54 +0200 Subject: [PATCH] use fill for _resetBufferLine --- src/InputHandler.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/InputHandler.ts b/src/InputHandler.ts index e7b21c0f..96832dfe 100644 --- a/src/InputHandler.ts +++ b/src/InputHandler.ts @@ -740,7 +740,9 @@ export class InputHandler extends Disposable implements IInputHandler { * @param y row index */ private _resetBufferLine(y: number): void { - this._eraseInBufferLine(y, 0, this._terminal.cols, true); + const line = this._terminal.buffer.lines.get(this._terminal.buffer.ybase + y); + line.fill(this._terminal.buffer.getNullCell(this._terminal.eraseAttrData())); + line.isWrapped = false; } /** @@ -756,6 +758,7 @@ export class InputHandler extends Disposable implements IInputHandler { * Ps = 2 -> Selective Erase All. */ public eraseInDisplay(params: IParams): void { + this._restrictCursor(); let j; switch (params.params[0]) { case 0: @@ -815,9 +818,7 @@ export class InputHandler extends Disposable implements IInputHandler { * Ps = 2 -> Selective Erase All. */ public eraseInLine(params: IParams): void { - if (this._terminal.buffer.x >= this._terminal.cols) { - this._terminal.buffer.x = this._terminal.cols - 1; - } + this._restrictCursor(); switch (params.params[0]) { case 0: this._eraseInBufferLine(this._terminal.buffer.y, this._terminal.buffer.x, this._terminal.cols);