From ade9a5a0918dca93f129f07f7a89783f1b862296 Mon Sep 17 00:00:00 2001 From: Daniel Imms <2193314+Tyriar@users.noreply.github.com> Date: Mon, 1 Jun 2026 20:11:34 -0700 Subject: [PATCH] fix(InputHandler): use ybase when clearing wrap after ED 1 eraseInDisplay Ps=1 clears from the start of the viewport through the cursor. When the cursor is in the last column, the following line's isWrapped flag must be cleared because the erased line can no longer continue a wrapped row. _eraseInBufferLine already addresses buffer lines with ybase + y, but the next-line lookup used lines.get(j + 1) without ybase. With scrollback (ybase > 0), that touched the wrong line and left incorrect wrap state on the line below the cursor. Co-authored-by: Cursor --- src/common/InputHandler.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/InputHandler.ts b/src/common/InputHandler.ts index 0b12dd8e1..9338d0d15 100644 --- a/src/common/InputHandler.ts +++ b/src/common/InputHandler.ts @@ -1246,7 +1246,7 @@ export class InputHandler extends Disposable implements IInputHandler { this._eraseInBufferLine(j, 0, this._activeBuffer.x + 1, true, respectProtect); if (this._activeBuffer.x + 1 >= this._bufferService.cols) { // Deleted entire previous line. This next line can no longer be wrapped. - const nextLine = this._activeBuffer.lines.get(j + 1); + const nextLine = this._activeBuffer.lines.get(this._activeBuffer.ybase + j + 1); if (nextLine) { nextLine.isWrapped = false; }