fix bug found by unit test: when deleting leftwards, we should never delete beyond the end of the line

This commit is contained in:
2025-09-20 18:04:59 +01:00
parent a0add68e92
commit 2758b864bc
2 changed files with 16 additions and 2 deletions

View File

@@ -250,7 +250,7 @@ struct
fun parseDeleteTerminal (str, count, app, chrCmd, time) =
case chrCmd of
(* terminal commands: require no input after *)
#"h" => NormalDelete.deleteByDfa (app, count, Cursor.viH, time)
#"h" => NormalDelete.deleteCharsLeft (app, count, time)
| #"l" => NormalDelete.deleteByDfa (app, count, Cursor.viL, time)
(* vi's 'j' and 'k' commands move up or down a column
* but 'dj' or 'dk' delete whole lines