From 5e052d0f472569eae3c1e0c6431bf8ab2963d560 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maur=C3=ADcio=20Szabo?= Date: Wed, 26 Jun 2024 17:37:46 -0300 Subject: [PATCH] Fixed delete to beginning and end of line --- src/selection.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/selection.js b/src/selection.js index 64a2fbdb8..d8d537dac 100644 --- a/src/selection.js +++ b/src/selection.js @@ -657,7 +657,7 @@ module.exports = class Selection { prevRange, '', pick(options, 'undo', 'normalizeLineEndings') ); } else { - const startOfLinePoint = new Point(this.cursor.getScreenRow(), 0); + const startOfLinePoint = new Point(this.cursor.getBufferRow(), 0); const prevRange = new Range(startPoint, startOfLinePoint); this.editor.buffer.setTextInRange( prevRange, '', pick(options, 'undo', 'normalizeLineEndings') @@ -692,7 +692,7 @@ module.exports = class Selection { this.delete(options); } else { this._deleteToNextPoint( - new Point(this.cursor.getScreenRow(), Infinity), + new Point(this.cursor.getBufferRow(), Infinity), options ); }