refactor Cursor.viH to use DFA
This commit is contained in:
@@ -337,7 +337,7 @@ struct
|
||||
else
|
||||
let
|
||||
val buffer = LineGap.goToIdx (low, buffer)
|
||||
val low = Cursor.viH (buffer, low)
|
||||
val low = Cursor.viH (buffer, low, 1)
|
||||
val buffer = LineGap.goToIdx (low, buffer)
|
||||
val low = Cursor.vi0 (buffer, low)
|
||||
val newCount = if low = 0 then 0 else count - 1
|
||||
|
||||
@@ -250,7 +250,7 @@ struct
|
||||
fun parseDeleteTerminal (str, count, app, chrCmd, time) =
|
||||
case chrCmd of
|
||||
(* terminal commands: require no input after *)
|
||||
#"h" => NormalDelete.delete (app, count, Cursor.viH, time)
|
||||
#"h" => NormalDelete.deleteByDfa (app, count, Cursor.viH, 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
|
||||
@@ -346,7 +346,7 @@ struct
|
||||
fun parseDeleteTerminal (str, count, app, chrCmd, time) =
|
||||
case chrCmd of
|
||||
(* terminal commands: require no input after *)
|
||||
#"h" => NormalYankDelete.delete (app, count, Cursor.viH, time)
|
||||
#"h" => NormalYankDelete.deleteByDfa (app, count, Cursor.viH, time)
|
||||
| #"l" => NormalYankDelete.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
|
||||
|
||||
Reference in New Issue
Block a user