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

@@ -61,7 +61,7 @@ end
functor MakeDfaMove(Fn: DFA_MOVE): MAKE_DFA_MOVE = functor MakeDfaMove(Fn: DFA_MOVE): MAKE_DFA_MOVE =
struct struct
fun move (app: AppType.app_type, count) = fun move (app: AppType.app_type, count) : AppType.app_type =
let let
val {buffer, cursorIdx, searchList, bufferModifyTime, ...} = app val {buffer, cursorIdx, searchList, bufferModifyTime, ...} = app
val buffer = LineGap.goToIdx (cursorIdx, buffer) val buffer = LineGap.goToIdx (cursorIdx, buffer)

View File

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

View File

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

View File

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