add todo note to implement yh/yj/yk/yl motions (yank according to h/j/k/l motions)

This commit is contained in:
2025-11-23 23:44:24 +00:00
parent eefe5221ba
commit d60e8bf7aa
2 changed files with 14 additions and 2 deletions

View File

@@ -580,7 +580,17 @@ struct
structure LeftArrow = structure LeftArrow =
struct struct
fun parseLeftArrowCommand (strPos, str, count, app, time) = fun parseLeftArrowCommand (strPos, str, count, app, time) =
raise Fail "unimplemented" case String.sub (str, strPos) of
#"y" =>
if strPos + 1 = String.size str then
(* terminal command, so simple yank *)
raise Fail "left-arrow-yank unimplemnted"
else
(case String.sub (str, strPos + 1) of
#"d" => NormalYankDelete.deleteCharsLeft (app, count, time)
| _ => NormalFinish.clearMode app)
| #"d" => NormalDelete.deleteCharsLeft (app, count, time)
| _ => NormalFinish.clearMode app
fun parse (app, str, time) = fun parse (app, str, time) =
if String.size str = 0 then if String.size str = 0 then
@@ -588,7 +598,7 @@ struct
else if String.size str = 1 then else if String.size str = 1 then
case Int.fromString str of case Int.fromString str of
SOME count => MoveViH.move (app, count) SOME count => MoveViH.move (app, count)
| NONE => parseLeftArrowCommand (0, app, str, 1, time) | NONE => parseLeftArrowCommand (0, str, 1, app, time)
else else
let let
val numLength = getNumLength (0, str) val numLength = getNumLength (0, str)

View File

@@ -11,3 +11,5 @@
- Add tests for both - Add tests for both
Afterwards, add tests for yanking. Afterwards, add tests for yanking.
Add yank commands like yh/yj/yk/yl as well and test them too.