add searchCursorIdx field specific to NORMAL_SEARCH_MODE which we will later use to keep track of where to add/remove characters in the in-progress searchString from

This commit is contained in:
2025-09-01 03:18:45 +01:00
parent 71c77fc6ac
commit b80bc3d93c
4 changed files with 27 additions and 18 deletions

View File

@@ -2,14 +2,17 @@ structure NormalSearchFinish =
struct
open AppType
fun onSearchChanged (app: app_type, searchString, tempSearchList, buffer) =
fun onSearchChanged
(app: app_type, searchString, tempSearchList, searchCursorIdx, buffer) =
let
open DrawMsg
val {buffer, cursorIdx, startLine, windowWidth, windowHeight, ...} = app
val mode =
NORMAL_SEARCH_MODE
{searchString = searchString, tempSearchList = tempSearchList}
val mode = NORMAL_SEARCH_MODE
{ searchString = searchString
, tempSearchList = tempSearchList
, searchCursorIdx = searchCursorIdx
}
val floatWindowWidth = Real32.fromInt windowWidth
val floatWindowHeight = Real32.fromInt windowHeight