done implementing tests for yank. Also simplify 'NormalDelete.deleteLineDown' and 'NormalYank.yankLineDown' functions by removing an if-branch which can never trigger. (The code path can only be executed in the event that 'endLineIdx' is on a newline, and there is an if-expression in that branch checking whether 'endLineIdx' is on a newline, which is redundant.)

This commit is contained in:
2026-01-31 22:20:52 +00:00
parent c0d4155808
commit 2ee963a3d8
4 changed files with 110 additions and 20 deletions

View File

@@ -130,13 +130,7 @@ struct
NormalFinish.clearMode app
else
let
val buffer = LineGap.goToIdx (endLineIdx, buffer)
val endLineIdx =
if Cursor.isCursorAtStartOfLine (buffer, endLineIdx) then
endLineIdx + 1
else
endLineIdx
val endLineIdx = endLineIdx + 1
val length = endLineIdx - startIdx
(* perform the actual yank *)