when constructing SEARCH message, include time in the message as well. This will enable us to ignore any messages when we have a 'later' state available.

This commit is contained in:
2025-09-07 13:24:41 +01:00
parent 89c4e85c98
commit f3c1905c0c
6 changed files with 17 additions and 17 deletions

View File

@@ -45,13 +45,13 @@ struct
end
(* save search string and tempSearchList and return to normal mode *)
fun saveSearch (app: app_type, searchString, tempSearchList) =
fun saveSearch (app: app_type, searchString, tempSearchList, time) =
let
val {buffer, cursorIdx, windowWidth, windowHeight, startLine, ...} = app
val buffer = LineGap.goToStart buffer
val searchString = EscapeString.unescape searchString
val initialMsg = [SEARCH (buffer, searchString)]
val initialMsg = [SEARCH (buffer, searchString, time)]
(* move LineGap to first line displayed on screen *)
val buffer = LineGap.goToLine (startLine, buffer)
@@ -136,7 +136,7 @@ struct
| KEY_BACKSPACE =>
backspace (app, searchString, tempSearchList, searchCursorIdx)
| KEY_ESC => exitToNormalMode app
| KEY_ENTER => saveSearch (app, searchString, tempSearchList)
| KEY_ENTER => saveSearch (app, searchString, tempSearchList, time)
| ARROW_LEFT =>
moveLeft (app, searchString, tempSearchList, searchCursorIdx)
| ARROW_RIGHT =>