diff --git a/fcore/app-type.sml b/fcore/app-type.sml index ed3ea76..ff3e5a7 100644 --- a/fcore/app-type.sml +++ b/fcore/app-type.sml @@ -1,34 +1,11 @@ -signature APP_TYPE = -sig - datatype mode = NORMAL_MODE of string - - type app_type = - { mode: mode - , buffer: LineGap.t - , searchList: SearchList.t - , searchString: string - , windowWidth: int - , windowHeight: int - (* line to start drawing from *) - , startLine: int - (* absolute index of movable cursor *) - , cursorIdx: int - (* msgs to send after an update. - * The list of messages is reset on each invocation of AppUpdate.update. *) - , msgs: MailboxType.t list - - } - - val init: LineGap.t * int * int -> app_type -end - -structure AppType :> APP_TYPE = +structure AppType = struct datatype mode = NORMAL_MODE of string type app_type = { mode: mode , buffer: LineGap.t + , bufferModifyTime: Time.time , searchList: SearchList.t , searchString: string , windowWidth: int @@ -42,9 +19,10 @@ struct , msgs: MailboxType.t list } - fun init (buffer, windowWidth, windowHeight) : app_type = + fun init (buffer, windowWidth, windowHeight, time) : app_type = { mode = NORMAL_MODE "" , buffer = buffer + , bufferModifyTime = time , searchList = SearchList.empty , searchString = "" , windowWidth = windowWidth diff --git a/shell/shell.sml b/shell/shell.sml index 4766d54..2ca01c5 100644 --- a/shell/shell.sml +++ b/shell/shell.sml @@ -63,7 +63,7 @@ struct val io = TextIO.openIn "temp.txt" val lineGap = ioToLineGap (io, LineGap.empty) val _ = TextIO.closeIn io - val app = AppType.init (lineGap, 1920, 1080) + val app = AppType.init (lineGap, 1920, 1080, Time.now ()) (* todo: remove temp line below which tests search list *) val app =