add tests for 'd$' motion, and fix bug. When we are extending an existing match and reached the last index of the buffer, we used to return the searchList right away. However, we are meant to add the extended match before returning the searchList. We do this now, and the bug is fixed.
This commit is contained in:
@@ -177,9 +177,12 @@ struct
|
||||
fun tryExtendingPrevMatch
|
||||
(idx, buffer, searchList, dfa, finalPos, curState, start) =
|
||||
if idx = #textLength buffer then
|
||||
(* reached end of buffer without finding anything
|
||||
* so return current buffer and searchList *)
|
||||
(buffer, searchList)
|
||||
let
|
||||
val searchList =
|
||||
PersistentVector.extendExistingMatch (start, finalPos, searchList)
|
||||
in
|
||||
(buffer, searchList)
|
||||
end
|
||||
else if Dfa.isDead curState then
|
||||
let
|
||||
val searchList =
|
||||
|
||||
Reference in New Issue
Block a user