fix compiler errors for normal-move.sml

This commit is contained in:
2025-09-12 13:23:46 +01:00
parent 22752e3602
commit 052f0efe16
2 changed files with 24 additions and 15 deletions

View File

@@ -155,7 +155,7 @@ 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 mode = NORMAL_MODE "" val mode = NORMAL_MODE ""
in in

View File

@@ -11,14 +11,15 @@ struct
, searchList , searchList
, searchString , searchString
, bufferModifyTime , bufferModifyTime
, visualScrollColumn
, ... , ...
} = app } = app
val cursorIdx = 0 val cursorIdx = 0
val startLine = 0 val startLine = 0
val buffer = LineGap.goToIdx (cursorIdx, buffer) val buffer = LineGap.goToStart buffer
val drawMsg = TextBuilder.build val drawMsg = NormalModeTextBuilder.build
( startLine ( startLine
, cursorIdx , cursorIdx
, buffer , buffer
@@ -26,8 +27,10 @@ struct
, windowHeight , windowHeight
, searchList , searchList
, searchString , searchString
, [] , visualScrollColumn
) )
val drawMsg = Vector.concat drawMsg
val drawMsg = [DrawMsg.DRAW_TEXT drawMsg]
val mode = NORMAL_MODE "" val mode = NORMAL_MODE ""
in in
@@ -75,18 +78,21 @@ struct
end end
val buffer = LineGap.goToLine (bufferLine, buffer) val buffer = LineGap.goToLine (bufferLine, buffer)
val lineIdx = TextBuilder.getLineAbsIdx (bufferLine, buffer) val lineIdx =
TextBuilderUtils.getLineAbsIdxFromBuffer (bufferLine, buffer)
val drawMsg = TextBuilder.build val drawMsg = NormalModeTextBuilder.build
( bufferLine ( bufferLine
, bufferIdx , lineIdx
, buffer , buffer
, windowWidth , windowWidth
, windowHeight , windowHeight
, searchList , searchList
, searchString , searchString
, [] , visualScrollColumn
) )
val drawMsg = Vector.concat drawMsg
val drawMsg = [DrawMsg.DRAW_TEXT drawMsg]
val mode = NORMAL_MODE "" val mode = NORMAL_MODE ""
in in
@@ -130,9 +136,8 @@ struct
(buffer, cursorIdx, origLine, windowWidth, windowHeight div 2) (buffer, cursorIdx, origLine, windowWidth, windowHeight div 2)
val buffer = LineGap.goToLine (startLine, buffer) val buffer = LineGap.goToLine (startLine, buffer)
val lineIdx = TextBuilder.getLineAbsIdx (startLine, buffer)
val drawMsg = TextBuilder.build val drawMsg = NormalModeTextBuilder.build
( startLine ( startLine
, cursorIdx , cursorIdx
, buffer , buffer
@@ -140,8 +145,10 @@ struct
, windowHeight , windowHeight
, searchList , searchList
, searchString , searchString
, [] , visualScrollColumn
) )
val drawMsg = Vector.concat drawMsg
val drawMsg = [DrawMsg.DRAW_TEXT drawMsg]
val mode = NORMAL_MODE "" val mode = NORMAL_MODE ""
in in
@@ -169,6 +176,7 @@ struct
, searchList , searchList
, searchString , searchString
, bufferModifyTime , bufferModifyTime
, visualScrollColumn
, ... , ...
} = app } = app
@@ -177,7 +185,7 @@ struct
val cursorIdx = Cursor.matchPair (buffer, cursorIdx) val cursorIdx = Cursor.matchPair (buffer, cursorIdx)
val buffer = LineGap.goToLine (startLine, buffer) val buffer = LineGap.goToLine (startLine, buffer)
val lineIdx = TextBuilder.getLineAbsIdx (startLine, buffer) val lineIdx = TextBuilderUtils.getLineAbsIdxFromBuffer (startLine, buffer)
in in
let let
val buffer = LineGap.goToIdx (cursorIdx, buffer) val buffer = LineGap.goToIdx (cursorIdx, buffer)
@@ -187,9 +195,8 @@ struct
(buffer, cursorIdx, startLine, windowWidth, windowHeight div 2) (buffer, cursorIdx, startLine, windowWidth, windowHeight div 2)
val buffer = LineGap.goToLine (startLine, buffer) val buffer = LineGap.goToLine (startLine, buffer)
val lineIdx = TextBuilder.getLineAbsIdx (startLine, buffer)
val drawMsg = TextBuilder.build val drawMsg = NormalModeTextBuilder.build
( startLine ( startLine
, cursorIdx , cursorIdx
, buffer , buffer
@@ -197,8 +204,10 @@ struct
, windowHeight , windowHeight
, searchList , searchList
, searchString , searchString
, [] , visualScrollColumn
) )
val drawMsg = Vector.concat drawMsg
val drawMsg = [DrawMsg.DRAW_TEXT drawMsg]
in in
NormalModeWith.bufferAndCursorIdx NormalModeWith.bufferAndCursorIdx
( app ( app