do not use 'clearMode' in helpDeleteChr function, because we have 'buffer' and 'cursorIdx' parameters we would like to add to the app state before exiting the loop. Instead, go to end of loop by passing 'count' of 0
This commit is contained in:
@@ -268,10 +268,11 @@ struct
|
||||
in
|
||||
if nextIsEnd andalso cursorIsStart then
|
||||
(* vi simply doesn't do anything on 'x' command
|
||||
* when cursor is at start of line, and next chr is line break *)
|
||||
clearMode app
|
||||
* when cursor is at start of line, and next chr is line break
|
||||
* so skip to end of loop by passing count of 0 *)
|
||||
helpDeleteChr (app, buffer, cursorIdx, 0)
|
||||
else if cursorIsStart then
|
||||
clearMode app
|
||||
helpDeleteChr (app, buffer, cursorIdx, 0)
|
||||
else if nextIsEnd then
|
||||
let
|
||||
(* delete char at cursor and then decrement cursorIdx by 1
|
||||
|
||||
Reference in New Issue
Block a user