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:
@@ -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 *)
|
||||
|
||||
Reference in New Issue
Block a user