fix further compiler errors

This commit is contained in:
2025-09-12 13:47:14 +01:00
parent 052f0efe16
commit 2ad7623848
4 changed files with 36 additions and 16 deletions

View File

@@ -6,6 +6,7 @@ end
functor MakeNormalDelete(Fn: MAKE_NORMAL_DELETE) =
struct
open AppType
open DrawMsg
open MailboxType
fun finishAfterDeletingBuffer (app: app_type, low, buffer, time, msgs) =
@@ -380,7 +381,7 @@ struct
, time
)
fun deleteToStart (app: app_type, time) =
fun deleteToStart (app: app_type, time) : AppType.app_type =
let
val {cursorIdx, buffer, windowWidth, windowHeight, searchString, ...} =
app
@@ -403,7 +404,7 @@ struct
val visualScrollColumn = 0
val buffer = LineGap.goToIdx (cursorIdx, buffer)
val drawMsg = TextBuilder.build
val drawMsg = NormalModeTextBuilder.build
( startLine
, cursorIdx
, buffer
@@ -411,9 +412,12 @@ struct
, windowHeight
, searchList
, searchString
, initialMsg
, visualScrollColumn
)
val drawMsg = Vector.concat drawMsg
val drawMsg = DRAW_TEXT drawMsg
val msgs = DRAW drawMsg :: initialMsg
val mode = NORMAL_MODE ""
in
NormalModeWith.bufferAndCursorIdx
@@ -423,7 +427,7 @@ struct
, mode
, startLine
, searchList
, drawMsg
, msgs
, time
, visualScrollColumn
)

View File

@@ -40,7 +40,8 @@ struct
, visualScrollColumn
)
val drawMsg = Vector.concat drawMsg
val drawMsg = DrawMsg.DRAW_TEXT drawMsg
val drawMsg = DRAW_TEXT drawMsg
val drawMsg = [DRAW drawMsg]
val mode = NORMAL_MODE ""
in
@@ -105,7 +106,8 @@ struct
, visualScrollColumn
)
val drawMsg = Vector.concat drawMsg
val drawMsg = DrawMsg.DRAW_TEXT drawMsg
val drawMsg = DRAW_TEXT drawMsg
val drawMsg = [DRAW drawMsg]
in
NormalModeWith.bufferAndSize
( app
@@ -125,7 +127,8 @@ struct
* Since the cursor may move away a lot, it is best to recenter.
* *)
fun buildTextAndClearAfterChr
(app: app_type, buffer, cursorIdx, searchList, initialMsg, bufferModifyTime) =
(app: app_type, buffer, cursorIdx, searchList, initialMsg, bufferModifyTime) :
AppType.app_type =
let
val {windowWidth, windowHeight, startLine, searchString, ...} = app
@@ -155,7 +158,8 @@ struct
, visualScrollColumn
)
val drawMsg = Vector.concat drawMsg
val drawMsg = [DrawMsg.DRAW_TEXT drawMsg]
val drawMsg = DRAW_TEXT drawMsg
val drawMsg = [DRAW drawMsg]
val mode = NORMAL_MODE ""
in
@@ -203,7 +207,8 @@ struct
, visualScrollColumn
)
val drawMsg = Vector.concat drawMsg
val drawMsg = [DrawMsg.DRAW_TEXT drawMsg]
val drawMsg = DRAW_TEXT drawMsg
val drawMsg = [DRAW drawMsg]
in
let
val _ = raise Fail "centering to line is unimplemented\n"

View File

@@ -2,7 +2,7 @@ structure NormalMove =
struct
open AppType
fun moveToStart (app: app_type) =
fun moveToStart (app: app_type) : AppType.app_type =
let
val
{ buffer
@@ -30,7 +30,8 @@ struct
, visualScrollColumn
)
val drawMsg = Vector.concat drawMsg
val drawMsg = [DrawMsg.DRAW_TEXT drawMsg]
val drawMsg = DrawMsg.DRAW_TEXT drawMsg
val drawMsg = [MailboxType.DRAW drawMsg]
val mode = NORMAL_MODE ""
in
@@ -92,7 +93,8 @@ struct
, visualScrollColumn
)
val drawMsg = Vector.concat drawMsg
val drawMsg = [DrawMsg.DRAW_TEXT drawMsg]
val drawMsg = DrawMsg.DRAW_TEXT drawMsg
val drawMsg = [MailboxType.DRAW drawMsg]
val mode = NORMAL_MODE ""
in
@@ -148,7 +150,8 @@ struct
, visualScrollColumn
)
val drawMsg = Vector.concat drawMsg
val drawMsg = [DrawMsg.DRAW_TEXT drawMsg]
val drawMsg = DrawMsg.DRAW_TEXT drawMsg
val drawMsg = [MailboxType.DRAW drawMsg]
val mode = NORMAL_MODE ""
in
@@ -207,7 +210,8 @@ struct
, visualScrollColumn
)
val drawMsg = Vector.concat drawMsg
val drawMsg = [DrawMsg.DRAW_TEXT drawMsg]
val drawMsg = DrawMsg.DRAW_TEXT drawMsg
val drawMsg = [MailboxType.DRAW drawMsg]
in
NormalModeWith.bufferAndCursorIdx
( app
@@ -269,7 +273,14 @@ struct
fun moveToNextMatch (app: app_type, count) =
let
val {cursorIdx, searchList, buffer, bufferModifyTime, ...} = app
val
{ cursorIdx
, searchList
, buffer
, bufferModifyTime
, visualScrollColumn
, ...
} = app
val newCursorIdx = SearchList.nextMatch (cursorIdx, searchList, count)
in
if newCursorIdx = ~1 then