adjust MakeNormalDelete.deleteLine implementation slightly, because the previous implementation did not delete the last character when we are at the end of the file

This commit is contained in:
2025-09-16 06:29:35 +01:00
parent 169f96f459
commit 6507b9d49c
2 changed files with 3 additions and 3 deletions

View File

@@ -275,10 +275,10 @@ struct
let let
val {buffer, cursorIdx, searchString, ...} = app val {buffer, cursorIdx, searchString, ...} = app
val buffer = LineGap.goToIdx (cursorIdx, buffer) val buffer = LineGap.goToIdx (cursorIdx, buffer)
val textLength = #textLength buffer
val startIdx = Cursor.vi0 (buffer, cursorIdx) val startIdx = Cursor.vi0 (buffer, cursorIdx)
val finishIdx = Cursor.viDlrForDelete (buffer, cursorIdx, count) val finishIdx = Cursor.viDlr (buffer, cursorIdx, count) + 2
val length = finishIdx - startIdx val length = finishIdx - startIdx
in in
deleteAndFinish (app, startIdx, length, buffer, time) deleteAndFinish (app, startIdx, length, buffer, time)