simplify and rewrite function 'del' in search-list.sml

This commit is contained in:
2024-11-16 08:33:26 +00:00
parent 0ba56bf6d3
commit 436b3e0d92
4 changed files with 104 additions and 63 deletions

View File

@@ -75,6 +75,31 @@ struct
}
end
fun onDelete
(app: app_type, newBuffer, newCursorIdx, newMode, newStartLine, newSearchList) =
let
val
{ mode = _
, buffer = _
, cursorIdx = _
, startLine = _
, searchList = _
, searchString
, windowWidth
, windowHeight
} = app
in
{ mode = newMode
, buffer = newBuffer
, cursorIdx = newCursorIdx
, startLine = newStartLine
, searchList = newSearchList
, searchString = searchString
, windowWidth = windowWidth
, windowHeight = windowHeight
}
end
fun mode (app: app_type, newMode) =
let
val