begin adding tests for 'yw' yank motion

This commit is contained in:
2026-02-04 09:26:57 +00:00
parent 2a8785a373
commit 83c660818e
4 changed files with 253 additions and 15 deletions

View File

@@ -200,9 +200,10 @@ struct
fun yankWhenMovingForward (app: app_type, fMove, count) =
let
val {buffer, cursorIdx, ...} = app
val buffer = LineGap.goToIdx (cursorIdx, buffer)
val high = fMove (buffer, cursorIdx, count)
val high = if high = #textLength buffer then high - 1 else high
val buffer = LineGap.goToIdx (high, buffer)
val length = high - cursorIdx