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
|
in
|
||||||
if nextIsEnd andalso cursorIsStart then
|
if nextIsEnd andalso cursorIsStart then
|
||||||
(* vi simply doesn't do anything on 'x' command
|
(* vi simply doesn't do anything on 'x' command
|
||||||
* when cursor is at start of line, and next chr is line break *)
|
* when cursor is at start of line, and next chr is line break
|
||||||
clearMode app
|
* so skip to end of loop by passing count of 0 *)
|
||||||
|
helpDeleteChr (app, buffer, cursorIdx, 0)
|
||||||
else if cursorIsStart then
|
else if cursorIsStart then
|
||||||
clearMode app
|
helpDeleteChr (app, buffer, cursorIdx, 0)
|
||||||
else if nextIsEnd then
|
else if nextIsEnd then
|
||||||
let
|
let
|
||||||
(* delete char at cursor and then decrement cursorIdx by 1
|
(* delete char at cursor and then decrement cursorIdx by 1
|
||||||
|
|||||||
Reference in New Issue
Block a user