begin scaffolding NormalSearchMode (normal mode, except we are searching)

This commit is contained in:
2025-08-31 02:10:57 +01:00
parent 1cf33c9dd7
commit 3b6dff3081
4 changed files with 18 additions and 3 deletions

View File

@@ -1,6 +1,6 @@
structure AppType =
struct
datatype mode = NORMAL_MODE of string
datatype mode = NORMAL_MODE of string | NORMAL_SEARCH_MODE of string
type app_type =
{ mode: mode

View File

@@ -2,6 +2,8 @@ structure AppUpdate =
struct
open AppType
fun update (app, msg, time) =
case #mode app of NORMAL_MODE str => NormalMode.update (app, str, msg, time)
fun update (app: app_type, msg, time) =
case #mode app of
NORMAL_MODE str => NormalMode.update (app, str, msg, time)
| NORMAL_SEARCH_MODE str => NormalSearchMode.update (app, str, msg, time)
end

View File

@@ -0,0 +1,12 @@
structure NormalSearchMode =
struct
open AppType
open InputMsg
fun update (app, searchString, msg, time) =
case msg of
CHAR_EVENT chrCmd => app
| KEY_ESC => Finish.clearMode app
| RESIZE_EVENT (width, height) => app
| WITH_SEARCH_LIST searchList => app
end

View File

@@ -42,6 +42,7 @@ fcore/move.sml
fcore/normal-mode/normal-move.sml
fcore/normal-mode/normal-delete.sml
fcore/normal-mode/normal-mode.sml
fcore/normal-mode/normal-search-mode.sml
fcore/app-update.sml