Fixed delete to beginning and end of line

This commit is contained in:
Maurício Szabo 2024-06-26 17:37:46 -03:00
parent 63242307d7
commit 5e052d0f47

View File

@ -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
);
}