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 <cursoragent@cursor.com>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user