From 22752e36025b6f02ed9ebe9cb4800972fb547cd0 Mon Sep 17 00:00:00 2001 From: Humza Shahid Date: Fri, 12 Sep 2025 13:02:32 +0100 Subject: [PATCH] fix compiler errors in normal-search-finish.sml --- fcore/normal-mode/normal-finish.sml | 2 +- fcore/normal-mode/normal-search-finish.sml | 27 +++++++++++++++------- 2 files changed, 20 insertions(+), 9 deletions(-) diff --git a/fcore/normal-mode/normal-finish.sml b/fcore/normal-mode/normal-finish.sml index 8e1f9b2..ef4d460 100644 --- a/fcore/normal-mode/normal-finish.sml +++ b/fcore/normal-mode/normal-finish.sml @@ -203,7 +203,7 @@ struct , visualScrollColumn ) val drawMsg = Vector.concat drawMsg - val drawMsg = DrawMsg.DRAW_TEXT drawMsg + val drawMsg = [DrawMsg.DRAW_TEXT drawMsg] in let val _ = raise Fail "centering to line is unimplemented\n" diff --git a/fcore/normal-mode/normal-search-finish.sml b/fcore/normal-mode/normal-search-finish.sml index 28600d5..f120b10 100644 --- a/fcore/normal-mode/normal-search-finish.sml +++ b/fcore/normal-mode/normal-search-finish.sml @@ -6,7 +6,15 @@ struct fun onSearchChanged (app: app_type, searchString, tempSearchList, searchCursorIdx, buffer) = let - val {buffer, cursorIdx, startLine, windowWidth, windowHeight, ...} = app + val + { buffer + , cursorIdx + , startLine + , windowWidth + , windowHeight + , visualScrollColumn + , ... + } = app val mode = NORMAL_SEARCH_MODE { searchString = searchString , tempSearchList = tempSearchList @@ -55,7 +63,7 @@ struct val remainingWindowHeight = windowHeight - (TextConstants.ySpace * 2) - val msgs = TextBuilder.buildWithExisting + val drawMsg = NormalModeTextBuilder.startBuild ( startLine , cursorIdx , buffer @@ -65,10 +73,11 @@ struct , floatWindowHeight , tempSearchList , searchString - , [] + , visualScrollColumn , cursor :: initialTextAcc - , [] ) + val drawMsg = Vector.concat drawMsg + val msgs = [DrawMsg.DRAW_TEXT drawMsg] in NormalSearchModeWith.changeTempSearchString (app, buffer, startLine, mode, msgs) @@ -82,7 +91,8 @@ struct , tempSearchList ) = let - val {buffer, cursorIdx, startLine, searchString, ...} = app + val {buffer, cursorIdx, startLine, searchString, visualScrollColumn, ...} = + app val floatWindowWidth = Real32.fromInt newWindowWidth val floatWindowHeight = Real32.fromInt newWindowHeight @@ -126,7 +136,7 @@ struct val remainingWindowHeight = newWindowHeight - (TextConstants.ySpace * 2) - val msgs = TextBuilder.buildWithExisting + val drawMsg = NormalModeTextBuilder.startBuild ( startLine , cursorIdx , buffer @@ -136,10 +146,11 @@ struct , floatWindowHeight , tempSearchList , searchString - , [] + , visualScrollColumn , cursor :: initialTextAcc - , [] ) + val drawMsg = Vector.concat drawMsg + val msgs = [DrawMsg.DRAW_TEXT drawMsg] in NormalSearchModeWith.bufferAndSize (app, buffer, newWindowWidth, newWindowHeight, msgs)