extract reusable function which can be used when a search string is changed, in NORMAL_SEARCH_MODE

This commit is contained in:
2025-09-01 02:18:23 +01:00
parent 9bae969511
commit 561e45c556
4 changed files with 88 additions and 39 deletions

View File

@@ -37,4 +37,33 @@ struct
, cursorIdx = cursorIdx
}
end
fun changeTempSearchString
(app: app_type, newBuffer, newStartLine, newMode, newMsgs) =
let
val
{ mode = _
, buffer = _
, searchString
, searchList
, startLine = _
, msgs = _
, bufferModifyTime
, windowWidth
, windowHeight
, cursorIdx
} = app
in
{ mode = newMode
, buffer = newBuffer
, startLine = newStartLine
, msgs = newMsgs
, searchString = searchString
, searchList = searchList
, bufferModifyTime = bufferModifyTime
, windowWidth = windowWidth
, windowHeight = windowHeight
, cursorIdx = cursorIdx
}
end
end