fix failing test for 'd$' motion, which means completing tests for 'd$' motion too

This commit is contained in:
2025-10-16 12:07:27 +01:00
parent f804a2a9fc
commit 7676556513
3 changed files with 4 additions and 2 deletions

View File

@@ -445,6 +445,10 @@ struct
* after having performed the deletion. *) * after having performed the deletion. *)
val buffer = LineGap.goToIdx (lineStart, buffer) val buffer = LineGap.goToIdx (lineStart, buffer)
val cursorIdx = Cursor.viDlr (buffer, lineStart, 1) val cursorIdx = Cursor.viDlr (buffer, lineStart, 1)
val buffer = LineGap.goToIdx (cursorIdx, buffer)
val cursorIdx =
if Cursor.isOnNewlineAfterChr (buffer, cursorIdx) then cursorIdx - 1
else cursorIdx
in in
finishAfterDeletingBuffer (app, cursorIdx, buffer, time, initialMsg) finishAfterDeletingBuffer (app, cursorIdx, buffer, time, initialMsg)
end end

View File

@@ -84,7 +84,6 @@ struct
(* load file intol gap buffer and create initial app *) (* load file intol gap buffer and create initial app *)
val io = TextIO.openIn "temp.txt" val io = TextIO.openIn "temp.txt"
val lineGap = ioToLineGap (io, LineGap.empty) val lineGap = ioToLineGap (io, LineGap.empty)
val lineGap = LineGap.fromString "hello\nworld"
val _ = TextIO.closeIn io val _ = TextIO.closeIn io
val app = AppType.init (lineGap, 1920, 1080, Time.now ()) val app = AppType.init (lineGap, 1920, 1080, Time.now ())

View File

@@ -1,7 +1,6 @@
# To-do list # To-do list
- Add tests for: - Add tests for:
- `d$`
- `d^` - `d^`
- `dd` - `dd`
- `dn` - `dn`