in search-list.sml: fix 'delRightFromHere' and 'delLeftFromHere' functions which joined newHd with left/right, rather than the tl, and therefore added new numbers to the list, which is incorrect behaviour. Fixed this by using joining with 'tl' rather than left/right. In build-search-list.sml: make fromRange function return tuple instead of an instance of app. Finally, in app-update.sml: progress towards refactoring 'helpRemoveChr' function to map and delete from searchList as desired.
This commit is contained in:
@@ -420,9 +420,14 @@ struct
|
||||
let
|
||||
(* delete char at cursor and then decrement cursorIdx by 1
|
||||
* if cursorIdx is not 0 *)
|
||||
val {searchString, ...} = app
|
||||
val buffer = LineGap.delete (cursorIdx, 1, buffer)
|
||||
val searchList = SearchList.delete (cursorIdx, 1, #searchString app, searchList)
|
||||
|
||||
val searchList = SearchList.delete (cursorIdx, 1, searchString, searchList)
|
||||
val searchList = SearchList.mapFrom (cursorIdx, ~1, searchList)
|
||||
val (buffer, searchList) =
|
||||
BuildSearchList.fromRange
|
||||
(cursorIdx, 1, buffer, searchString, searchList)
|
||||
|
||||
val cursorIdx =
|
||||
if
|
||||
@@ -435,9 +440,14 @@ struct
|
||||
end
|
||||
else
|
||||
let
|
||||
val {searchString, ...} = app
|
||||
val buffer = LineGap.delete (cursorIdx, 1, buffer)
|
||||
val searchList = SearchList.delete (cursorIdx, 1, #searchString app, searchList)
|
||||
|
||||
val searchList = SearchList.delete (cursorIdx, 1, searchString, searchList)
|
||||
val searchList = SearchList.mapFrom (cursorIdx, ~1, searchList)
|
||||
val (buffer, searchList) =
|
||||
BuildSearchList.fromRange
|
||||
(cursorIdx, 1, buffer, searchString, searchList)
|
||||
in
|
||||
helpRemoveChr (app, buffer, searchList, cursorIdx, count - 1)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user