begin scaffolding NormalSearchMode (normal mode, except we are searching)
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
structure AppType =
|
structure AppType =
|
||||||
struct
|
struct
|
||||||
datatype mode = NORMAL_MODE of string
|
datatype mode = NORMAL_MODE of string | NORMAL_SEARCH_MODE of string
|
||||||
|
|
||||||
type app_type =
|
type app_type =
|
||||||
{ mode: mode
|
{ mode: mode
|
||||||
|
|||||||
@@ -2,6 +2,8 @@ structure AppUpdate =
|
|||||||
struct
|
struct
|
||||||
open AppType
|
open AppType
|
||||||
|
|
||||||
fun update (app, msg, time) =
|
fun update (app: app_type, msg, time) =
|
||||||
case #mode app of NORMAL_MODE str => NormalMode.update (app, str, 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
|
end
|
||||||
|
|||||||
12
fcore/normal-mode/normal-search-mode.sml
Normal file
12
fcore/normal-mode/normal-search-mode.sml
Normal 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
|
||||||
1
shf.mlb
1
shf.mlb
@@ -42,6 +42,7 @@ fcore/move.sml
|
|||||||
fcore/normal-mode/normal-move.sml
|
fcore/normal-mode/normal-move.sml
|
||||||
fcore/normal-mode/normal-delete.sml
|
fcore/normal-mode/normal-delete.sml
|
||||||
fcore/normal-mode/normal-mode.sml
|
fcore/normal-mode/normal-mode.sml
|
||||||
|
fcore/normal-mode/normal-search-mode.sml
|
||||||
|
|
||||||
fcore/app-update.sml
|
fcore/app-update.sml
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user