diff --git a/src/common/InputHandler.test.ts b/src/common/InputHandler.test.ts index 9eab8cfa2..db8f771a0 100644 --- a/src/common/InputHandler.test.ts +++ b/src/common/InputHandler.test.ts @@ -475,6 +475,13 @@ describe('InputHandler', () => { inputHandler.eraseInLine(Params.fromArray([1])); assert.equal(bufferService.buffer.lines.get(2)!.isWrapped, true); + // params[1] - full line erase at last column clears wrap on next line + await resetToBaseState(); + bufferService.buffer.y = 1; + bufferService.buffer.x = bufferService.cols - 1; + inputHandler.eraseInLine(Params.fromArray([1])); + assert.equal(bufferService.buffer.lines.get(2)!.isWrapped, false); + // params[2] - erase complete line await resetToBaseState(); bufferService.buffer.y = 2; diff --git a/src/common/InputHandler.ts b/src/common/InputHandler.ts index 9338d0d15..94a6401d3 100644 --- a/src/common/InputHandler.ts +++ b/src/common/InputHandler.ts @@ -1324,6 +1324,12 @@ export class InputHandler extends Disposable implements IInputHandler { break; case 1: this._eraseInBufferLine(this._activeBuffer.y, 0, this._activeBuffer.x + 1, false, respectProtect); + if (this._activeBuffer.x + 1 >= this._bufferService.cols) { + const nextLine = this._activeBuffer.lines.get(this._activeBuffer.ybase + this._activeBuffer.y + 1); + if (nextLine) { + nextLine.isWrapped = false; + } + } break; case 2: this._eraseInBufferLine(this._activeBuffer.y, 0, this._bufferService.cols, true, respectProtect);