diff --git a/fcore/app-type.sml b/fcore/app-type.sml index 6e12a0c..ea9a08a 100644 --- a/fcore/app-type.sml +++ b/fcore/app-type.sml @@ -24,6 +24,7 @@ struct , cursorIdx: int (* column to start drawing text at for horizontal scrolling. *) , visualScrollColumn: int + , dfa: int vector vector (* msgs to send after an update. * The list of messages is reset on each invocation of AppUpdate.update. *) , msgs: MailboxType.t list @@ -40,6 +41,7 @@ struct , startLine = 0 , cursorIdx = 0 , visualScrollColumn = 0 + , dfa = Vector.fromList [] , msgs = [] } end diff --git a/fcore/normal-mode/normal-mode-with.sml b/fcore/normal-mode/normal-mode-with.sml index a4004bb..17bb3ee 100644 --- a/fcore/normal-mode/normal-mode-with.sml +++ b/fcore/normal-mode/normal-mode-with.sml @@ -16,6 +16,7 @@ struct , searchString , startLine , cursorIdx + , dfa } = app in { mode = newMode @@ -29,6 +30,7 @@ struct , searchString = searchString , startLine = startLine , cursorIdx = cursorIdx + , dfa = dfa } end @@ -55,6 +57,7 @@ struct , searchString , startLine , cursorIdx + , dfa } = app in { mode = mode @@ -68,6 +71,7 @@ struct , searchString = searchString , startLine = startLine , cursorIdx = cursorIdx + , dfa = dfa } end @@ -95,6 +99,7 @@ struct , searchString , windowWidth , windowHeight + , dfa } = app in { mode = newMode @@ -108,6 +113,7 @@ struct , searchString = searchString , windowWidth = windowWidth , windowHeight = windowHeight + , dfa = dfa } end @@ -125,6 +131,7 @@ struct , windowHeight , startLine , visualScrollColumn + , dfa } = app in { mode = newMode @@ -138,6 +145,7 @@ struct , windowHeight = windowHeight , startLine = startLine , visualScrollColumn = visualScrollColumn + , dfa = dfa } end @@ -155,6 +163,7 @@ struct , windowHeight , startLine , visualScrollColumn + , dfa } = app in { mode = newMode @@ -168,10 +177,10 @@ struct , windowHeight = windowHeight , startLine = startLine , visualScrollColumn = visualScrollColumn + , dfa = dfa } end - fun searchList ( app: app_type , newSearchList @@ -192,6 +201,7 @@ struct , windowHeight , startLine , visualScrollColumn + , dfa } = app in { searchList = newSearchList @@ -205,6 +215,7 @@ struct , windowHeight = windowHeight , startLine = startLine , visualScrollColumn = visualScrollColumn + , dfa = dfa } end end diff --git a/fcore/normal-mode/normal-mode.sml b/fcore/normal-mode/normal-mode.sml index 7fdd659..8d73569 100644 --- a/fcore/normal-mode/normal-mode.sml +++ b/fcore/normal-mode/normal-mode.sml @@ -7,7 +7,7 @@ struct fun switchToNormalSearchMode (app: app_type) = NormalSearchFinish.onSearchChanged - (app, "", PersistentVector.empty, 0, 0, true, #buffer app) + (app, "", PersistentVector.empty, 0, 0, false, #buffer app) fun getNumLength (pos, str) = if pos = String.size str then diff --git a/fcore/normal-mode/normal-search-mode-with.sml b/fcore/normal-mode/normal-search-mode-with.sml index fdbc0a5..bb6d710 100644 --- a/fcore/normal-mode/normal-search-mode-with.sml +++ b/fcore/normal-mode/normal-search-mode-with.sml @@ -9,6 +9,7 @@ struct , newSearchList , newStartLine , newMode + , newDfa , newMsgs ) = let @@ -19,6 +20,7 @@ struct , searchList = _ , startLine = _ , msgs = _ + , dfa = _ , bufferModifyTime , windowWidth , windowHeight @@ -31,6 +33,7 @@ struct , searchString = newSearchString , searchList = newSearchList , startLine = newStartLine + , dfa = newDfa , bufferModifyTime = bufferModifyTime , msgs = newMsgs , windowWidth = windowWidth @@ -55,6 +58,7 @@ struct , windowHeight , cursorIdx , visualScrollColumn + , dfa } = app in { mode = newMode @@ -68,6 +72,7 @@ struct , windowHeight = windowHeight , cursorIdx = cursorIdx , visualScrollColumn = visualScrollColumn + , dfa = dfa } end @@ -85,6 +90,7 @@ struct , windowHeight , cursorIdx , visualScrollColumn + , dfa } = app in { mode = mode @@ -98,6 +104,7 @@ struct , windowHeight = windowHeight , cursorIdx = cursorIdx , visualScrollColumn = visualScrollColumn + , dfa = dfa } end @@ -122,6 +129,7 @@ struct , bufferModifyTime , cursorIdx , visualScrollColumn + , dfa } = app in { mode = newMode @@ -135,6 +143,7 @@ struct , bufferModifyTime = bufferModifyTime , cursorIdx = cursorIdx , visualScrollColumn = visualScrollColumn + , dfa = dfa } end end diff --git a/fcore/normal-mode/normal-search-mode.sml b/fcore/normal-mode/normal-search-mode.sml index 99de563..a3ae115 100644 --- a/fcore/normal-mode/normal-search-mode.sml +++ b/fcore/normal-mode/normal-search-mode.sml @@ -93,9 +93,11 @@ struct val msgs = DRAW drawMsg :: initialMsg val mode = NORMAL_MODE "" + + val dfa = raise Fail "todo" in NormalSearchModeWith.returnToNormalMode - (app, buffer, searchString, tempSearchList, startLine, mode, msgs) + (app, buffer, searchString, tempSearchList, startLine, mode, dfa, msgs) end fun backspace