fix compiler errors in normal-search-finish.sml

This commit is contained in:
2025-09-12 13:02:32 +01:00
parent 504a054df1
commit 22752e3602
2 changed files with 20 additions and 9 deletions

View File

@@ -203,7 +203,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]
in in
let let
val _ = raise Fail "centering to line is unimplemented\n" val _ = raise Fail "centering to line is unimplemented\n"

View File

@@ -6,7 +6,15 @@ struct
fun onSearchChanged fun onSearchChanged
(app: app_type, searchString, tempSearchList, searchCursorIdx, buffer) = (app: app_type, searchString, tempSearchList, searchCursorIdx, buffer) =
let let
val {buffer, cursorIdx, startLine, windowWidth, windowHeight, ...} = app val
{ buffer
, cursorIdx
, startLine
, windowWidth
, windowHeight
, visualScrollColumn
, ...
} = app
val mode = NORMAL_SEARCH_MODE val mode = NORMAL_SEARCH_MODE
{ searchString = searchString { searchString = searchString
, tempSearchList = tempSearchList , tempSearchList = tempSearchList
@@ -55,7 +63,7 @@ struct
val remainingWindowHeight = windowHeight - (TextConstants.ySpace * 2) val remainingWindowHeight = windowHeight - (TextConstants.ySpace * 2)
val msgs = TextBuilder.buildWithExisting val drawMsg = NormalModeTextBuilder.startBuild
( startLine ( startLine
, cursorIdx , cursorIdx
, buffer , buffer
@@ -65,10 +73,11 @@ struct
, floatWindowHeight , floatWindowHeight
, tempSearchList , tempSearchList
, searchString , searchString
, [] , visualScrollColumn
, cursor :: initialTextAcc , cursor :: initialTextAcc
, []
) )
val drawMsg = Vector.concat drawMsg
val msgs = [DrawMsg.DRAW_TEXT drawMsg]
in in
NormalSearchModeWith.changeTempSearchString NormalSearchModeWith.changeTempSearchString
(app, buffer, startLine, mode, msgs) (app, buffer, startLine, mode, msgs)
@@ -82,7 +91,8 @@ struct
, tempSearchList , tempSearchList
) = ) =
let let
val {buffer, cursorIdx, startLine, searchString, ...} = app val {buffer, cursorIdx, startLine, searchString, visualScrollColumn, ...} =
app
val floatWindowWidth = Real32.fromInt newWindowWidth val floatWindowWidth = Real32.fromInt newWindowWidth
val floatWindowHeight = Real32.fromInt newWindowHeight val floatWindowHeight = Real32.fromInt newWindowHeight
@@ -126,7 +136,7 @@ struct
val remainingWindowHeight = newWindowHeight - (TextConstants.ySpace * 2) val remainingWindowHeight = newWindowHeight - (TextConstants.ySpace * 2)
val msgs = TextBuilder.buildWithExisting val drawMsg = NormalModeTextBuilder.startBuild
( startLine ( startLine
, cursorIdx , cursorIdx
, buffer , buffer
@@ -136,10 +146,11 @@ struct
, floatWindowHeight , floatWindowHeight
, tempSearchList , tempSearchList
, searchString , searchString
, [] , visualScrollColumn
, cursor :: initialTextAcc , cursor :: initialTextAcc
, []
) )
val drawMsg = Vector.concat drawMsg
val msgs = [DrawMsg.DRAW_TEXT drawMsg]
in in
NormalSearchModeWith.bufferAndSize NormalSearchModeWith.bufferAndSize
(app, buffer, newWindowWidth, newWindowHeight, msgs) (app, buffer, newWindowWidth, newWindowHeight, msgs)