progress implementing help-prev-match for vector
This commit is contained in:
@@ -778,7 +778,8 @@ struct
|
||||
fun deleteToPrevMatch (app: app_type, count, time) =
|
||||
let
|
||||
val {cursorIdx, searchList, ...} = app
|
||||
val newCursorIdx = SearchList.prevMatch (cursorIdx, searchList, count)
|
||||
val newCursorIdx =
|
||||
PersistentVector.prevMatch (cursorIdx, searchList, count)
|
||||
in
|
||||
if newCursorIdx = ~1 orelse newCursorIdx >= cursorIdx then
|
||||
NormalFinish.clearMode app
|
||||
|
||||
@@ -494,7 +494,8 @@ struct
|
||||
, visualScrollColumn
|
||||
, ...
|
||||
} = app
|
||||
val newCursorIdx = PersistentVector.nextMatch (cursorIdx, searchList, count)
|
||||
val newCursorIdx =
|
||||
PersistentVector.nextMatch (cursorIdx, searchList, count)
|
||||
in
|
||||
if newCursorIdx = ~1 then
|
||||
NormalFinish.clearMode app
|
||||
@@ -506,7 +507,8 @@ struct
|
||||
fun moveToPrevMatch (app: app_type, count) =
|
||||
let
|
||||
val {cursorIdx, searchList, buffer, bufferModifyTime, ...} = app
|
||||
val newCursorIdx = SearchList.prevMatch (cursorIdx, searchList, count)
|
||||
val newCursorIdx =
|
||||
PersistentVector.prevMatch (cursorIdx, searchList, count)
|
||||
in
|
||||
if newCursorIdx = ~1 then
|
||||
NormalFinish.clearMode app
|
||||
|
||||
@@ -188,7 +188,7 @@ struct
|
||||
fun yankToPrevMatch (app: app_type, count) =
|
||||
let
|
||||
val {cursorIdx, searchList, buffer, ...} = app
|
||||
val low = SearchList.prevMatch (cursorIdx, searchList, count)
|
||||
val low = PersistentVector.prevMatch (cursorIdx, searchList, count)
|
||||
in
|
||||
if low = ~1 orelse low >= cursorIdx then
|
||||
NormalFinish.clearMode app
|
||||
|
||||
Reference in New Issue
Block a user