remove 'searchString' field from app_type, because the same role is fulfilled by new 'dfa' field

This commit is contained in:
2025-10-08 05:40:29 +01:00
parent df346d0a9e
commit 06106f5de8
9 changed files with 46 additions and 84 deletions

View File

@@ -15,7 +15,6 @@ struct
, buffer: LineGap.t , buffer: LineGap.t
, bufferModifyTime: Time.time , bufferModifyTime: Time.time
, searchList: PersistentVector.t , searchList: PersistentVector.t
, searchString: string
, windowWidth: int , windowWidth: int
, windowHeight: int , windowHeight: int
(* line to start drawing from *) (* line to start drawing from *)
@@ -35,7 +34,6 @@ struct
, buffer = buffer , buffer = buffer
, bufferModifyTime = time , bufferModifyTime = time
, searchList = SearchList.empty , searchList = SearchList.empty
, searchString = ""
, windowWidth = windowWidth , windowWidth = windowWidth
, windowHeight = windowHeight , windowHeight = windowHeight
, startLine = 0 , startLine = 0

View File

@@ -12,13 +12,12 @@ struct
fun finishAfterDeletingBuffer (app: app_type, low, buffer, time, msgs) = fun finishAfterDeletingBuffer (app: app_type, low, buffer, time, msgs) =
let let
val buffer = LineGap.goToIdx (low, buffer) val buffer = LineGap.goToIdx (low, buffer)
val searchString = #searchString app
val buffer = LineGap.goToStart buffer val buffer = LineGap.goToStart buffer
val msgs = SEARCH (buffer, searchString, time) :: msgs val msgs = SEARCH (buffer, raise Fail "searchString", time) :: msgs
val buffer = LineGap.goToIdx (low - 1111, buffer) val buffer = LineGap.goToIdx (low - 1111, buffer)
val (buffer, searchList) = val (buffer, searchList) =
SearchList.buildRange (buffer, searchString, low + 1111, #dfa app) SearchList.buildRange (buffer, low + 1111, #dfa app)
val buffer = LineGap.goToIdx (low, buffer) val buffer = LineGap.goToIdx (low, buffer)
in in
@@ -236,13 +235,12 @@ struct
val buffer = LineGap.delete (low, length, buffer) val buffer = LineGap.delete (low, length, buffer)
val buffer = LineGap.goToStart buffer val buffer = LineGap.goToStart buffer
val searchString = #searchString app val initialMsg =
val initialMsg = SEARCH (buffer, searchString, time) :: initialMsg SEARCH (buffer, raise Fail "searchString", time) :: initialMsg
val buffer = LineGap.goToIdx (cursorIdx - 1111, buffer) val buffer = LineGap.goToIdx (cursorIdx - 1111, buffer)
val (buffer, searchList) = val (buffer, searchList) =
SearchList.buildRange SearchList.buildRange (buffer, cursorIdx + 1111, #dfa app)
(buffer, searchString, cursorIdx + 1111, #dfa app)
(* If we have deleted from the buffer so that cursorIdx (* If we have deleted from the buffer so that cursorIdx
* is no longer a valid idx, * is no longer a valid idx,
@@ -377,7 +375,7 @@ struct
fun deleteToEndOfPrevWord (app: app_type, count, time) = fun deleteToEndOfPrevWord (app: app_type, count, time) =
let let
val {buffer, cursorIdx, searchString, ...} = app val {buffer, cursorIdx, ...} = app
val buffer = LineGap.goToIdx (cursorIdx, buffer) val buffer = LineGap.goToIdx (cursorIdx, buffer)
val low = Cursor.endOfPrevWord (buffer, cursorIdx, count) val low = Cursor.endOfPrevWord (buffer, cursorIdx, count)
@@ -389,7 +387,7 @@ struct
fun deleteToEndOfPrevWORD (app: app_type, count, time) = fun deleteToEndOfPrevWORD (app: app_type, count, time) =
let let
val {buffer, cursorIdx, searchString, ...} = app val {buffer, cursorIdx, ...} = app
val buffer = LineGap.goToIdx (cursorIdx, buffer) val buffer = LineGap.goToIdx (cursorIdx, buffer)
val low = Cursor.endOfPrevWORD (buffer, cursorIdx, count) val low = Cursor.endOfPrevWORD (buffer, cursorIdx, count)
@@ -636,15 +634,7 @@ struct
fun deleteToFirstNonSpaceChr (app: app_type, time) = fun deleteToFirstNonSpaceChr (app: app_type, time) =
let let
val val {buffer, cursorIdx, windowWidth, windowHeight, startLine, ...} = app
{ buffer
, cursorIdx
, windowWidth
, windowHeight
, startLine
, searchString
, ...
} = app
(* move LineGap and buffer to start of line *) (* move LineGap and buffer to start of line *)
val buffer = LineGap.goToIdx (cursorIdx, buffer) val buffer = LineGap.goToIdx (cursorIdx, buffer)
@@ -706,8 +696,7 @@ struct
fun deleteToStart (app: app_type, time) : AppType.app_type = fun deleteToStart (app: app_type, time) : AppType.app_type =
let let
val {cursorIdx, buffer, windowWidth, windowHeight, searchString, dfa, ...} = val {cursorIdx, buffer, windowWidth, windowHeight, dfa, ...} = app
app
val buffer = LineGap.goToIdx (cursorIdx, buffer) val buffer = LineGap.goToIdx (cursorIdx, buffer)
val cursorIdx = Cursor.viDlrForDelete (buffer, cursorIdx, 1) val cursorIdx = Cursor.viDlrForDelete (buffer, cursorIdx, 1)
@@ -716,11 +705,12 @@ struct
val buffer = LineGap.delete (0, cursorIdx, buffer) val buffer = LineGap.delete (0, cursorIdx, buffer)
val buffer = LineGap.goToStart buffer val buffer = LineGap.goToStart buffer
val initialMsg = SEARCH (buffer, #searchString app, time) :: initialMsg val initialMsg =
SEARCH (buffer, raise Fail "searchString", time) :: initialMsg
val buffer = LineGap.goToIdx (cursorIdx - 1111, buffer) val buffer = LineGap.goToIdx (cursorIdx - 1111, buffer)
val (buffer, searchList) = val (buffer, searchList) =
SearchList.buildRange (buffer, searchString, cursorIdx + 1111, dfa) SearchList.buildRange (buffer, cursorIdx + 1111, dfa)
val cursorIdx = 0 val cursorIdx = 0
val startLine = 0 val startLine = 0
@@ -757,18 +747,18 @@ struct
fun helpDeleteToMatch (app: app_type, low, high, time) = fun helpDeleteToMatch (app: app_type, low, high, time) =
let let
val {buffer, searchString, dfa, ...} = app val {buffer, dfa, ...} = app
val buffer = LineGap.goToIdx (high, buffer) val buffer = LineGap.goToIdx (high, buffer)
val length = high - low val length = high - low
val initialMsg = Fn.initMsgs (low, length, buffer) val initialMsg = Fn.initMsgs (low, length, buffer)
val buffer = LineGap.delete (low, length, buffer) val buffer = LineGap.delete (low, length, buffer)
val buffer = LineGap.goToStart buffer val buffer = LineGap.goToStart buffer
val initialMsg = SEARCH (buffer, searchString, time) :: initialMsg val initialMsg =
SEARCH (buffer, raise Fail "searchString", time) :: initialMsg
val buffer = LineGap.goToIdx (low - 1111, buffer) val buffer = LineGap.goToIdx (low - 1111, buffer)
val (buffer, searchList) = val (buffer, searchList) = SearchList.buildRange (buffer, low + 1111, dfa)
SearchList.buildRange (buffer, searchString, low + 1111, dfa)
val buffer = LineGap.goToIdx (low, buffer) val buffer = LineGap.goToIdx (low, buffer)
in in
@@ -805,7 +795,7 @@ struct
fun deleteInsideWord (app: app_type, time) = fun deleteInsideWord (app: app_type, time) =
let let
val {buffer, cursorIdx, searchString, dfa, ...} = app val {buffer, cursorIdx, dfa, ...} = app
val buffer = LineGap.goToIdx (cursorIdx, buffer) val buffer = LineGap.goToIdx (cursorIdx, buffer)
val low = Cursor.prevWordStrict (buffer, cursorIdx, 1) val low = Cursor.prevWordStrict (buffer, cursorIdx, 1)
@@ -823,11 +813,12 @@ struct
val buffer = LineGap.delete (low, length, buffer) val buffer = LineGap.delete (low, length, buffer)
val buffer = LineGap.goToStart buffer val buffer = LineGap.goToStart buffer
val initialMsg = SEARCH (buffer, searchString, time) :: initialMsg val initialMsg =
SEARCH (buffer, raise Fail "searchString", time) :: initialMsg
val buffer = LineGap.goToIdx (low - 1111, buffer) val buffer = LineGap.goToIdx (low - 1111, buffer)
val (buffer, searchList) = val (buffer, searchList) =
SearchList.buildRange (buffer, searchString, low + 1111, dfa) SearchList.buildRange (buffer, low + 1111, dfa)
val buffer = LineGap.goToIdx (low, buffer) val buffer = LineGap.goToIdx (low, buffer)
in in
@@ -840,7 +831,7 @@ struct
fun deleteInsideWORD (app: app_type, time) = fun deleteInsideWORD (app: app_type, time) =
let let
val {buffer, cursorIdx, searchString, dfa, ...} = app val {buffer, cursorIdx, dfa, ...} = app
val buffer = LineGap.goToIdx (cursorIdx, buffer) val buffer = LineGap.goToIdx (cursorIdx, buffer)
val low = Cursor.prevWORDStrict (buffer, cursorIdx, 1) val low = Cursor.prevWORDStrict (buffer, cursorIdx, 1)
@@ -855,11 +846,12 @@ struct
val buffer = LineGap.delete (low, length, buffer) val buffer = LineGap.delete (low, length, buffer)
val buffer = LineGap.goToStart buffer val buffer = LineGap.goToStart buffer
val initialMsg = SEARCH (buffer, searchString, time) :: initialMsg val initialMsg =
SEARCH (buffer, raise Fail "searchString", time) :: initialMsg
val buffer = LineGap.goToIdx (low - 1111, buffer) val buffer = LineGap.goToIdx (low - 1111, buffer)
val (buffer, searchList) = val (buffer, searchList) =
SearchList.buildRange (buffer, searchString, low + 1111, dfa) SearchList.buildRange (buffer, low + 1111, dfa)
val buffer = LineGap.goToIdx (low, buffer) val buffer = LineGap.goToIdx (low, buffer)
in in
@@ -875,7 +867,7 @@ struct
NormalFinish.clearMode app NormalFinish.clearMode app
else else
let let
val {cursorIdx, buffer, searchString, dfa, ...} = app val {cursorIdx, buffer, dfa, ...} = app
val low = origLow + 1 val low = origLow + 1
val length = high - low val length = high - low
@@ -884,11 +876,12 @@ struct
val buffer = LineGap.delete (low, length, buffer) val buffer = LineGap.delete (low, length, buffer)
val buffer = LineGap.goToStart buffer val buffer = LineGap.goToStart buffer
val initialMsg = SEARCH (buffer, searchString, time) :: initialMsg val initialMsg =
SEARCH (buffer, raise Fail "searchString", time) :: initialMsg
val buffer = LineGap.goToIdx (low - 1111, buffer) val buffer = LineGap.goToIdx (low - 1111, buffer)
val (buffer, searchList) = val (buffer, searchList) =
SearchList.buildRange (buffer, searchString, low + 1111, dfa) SearchList.buildRange (buffer, low + 1111, dfa)
val buffer = LineGap.goToIdx (origLow, buffer) val buffer = LineGap.goToIdx (origLow, buffer)
in in
@@ -996,13 +989,13 @@ struct
else else
low low
val searchString = #searchString app
val buffer = LineGap.goToStart buffer val buffer = LineGap.goToStart buffer
val initialMsg = SEARCH (buffer, searchString, time) :: initialMsg val initialMsg =
SEARCH (buffer, raise Fail "searchString", time) :: initialMsg
val buffer = LineGap.goToIdx (low - 1111, buffer) val buffer = LineGap.goToIdx (low - 1111, buffer)
val (buffer, searchList) = val (buffer, searchList) =
SearchList.buildRange (buffer, searchString, low + 1111, dfa) SearchList.buildRange (buffer, low + 1111, dfa)
val buffer = LineGap.goToIdx (low, buffer) val buffer = LineGap.goToIdx (low, buffer)
in in

View File

@@ -15,7 +15,6 @@ struct
val val
{ windowWidth { windowWidth
, windowHeight , windowHeight
, searchString
, visualScrollColumn = prevScrollColumn , visualScrollColumn = prevScrollColumn
, startLine = prevLineNumber , startLine = prevLineNumber
, ... , ...
@@ -69,9 +68,10 @@ struct
in in
if searchTime >= #bufferModifyTime app then if searchTime >= #bufferModifyTime app then
let let
val {buffer, searchString, cursorIdx, bufferModifyTime, ...} = app val {buffer, cursorIdx, bufferModifyTime, ...} = app
val app = NormalModeWith.searchList val app =
(app, searchList, buffer, searchString, bufferModifyTime) NormalModeWith.searchList
(app, searchList, buffer, bufferModifyTime)
in in
buildTextAndClear buildTextAndClear
(app, buffer, cursorIdx, searchList, [], bufferModifyTime) (app, buffer, cursorIdx, searchList, [], bufferModifyTime)
@@ -89,7 +89,6 @@ struct
, startLine , startLine
, cursorIdx , cursorIdx
, searchList , searchList
, searchString
, bufferModifyTime , bufferModifyTime
, visualScrollColumn = prevScrollColumn , visualScrollColumn = prevScrollColumn
, ... , ...
@@ -136,7 +135,6 @@ struct
, startLine = prevLineNumber , startLine = prevLineNumber
, cursorIdx , cursorIdx
, searchList , searchList
, searchString
, bufferModifyTime , bufferModifyTime
, visualScrollColumn , visualScrollColumn
, ... , ...

View File

@@ -13,7 +13,6 @@ struct
, windowHeight , windowHeight
, searchList , searchList
, visualScrollColumn , visualScrollColumn
, searchString
, startLine , startLine
, cursorIdx , cursorIdx
, dfa , dfa
@@ -27,7 +26,6 @@ struct
, windowHeight = windowHeight , windowHeight = windowHeight
, searchList = searchList , searchList = searchList
, visualScrollColumn = visualScrollColumn , visualScrollColumn = visualScrollColumn
, searchString = searchString
, startLine = startLine , startLine = startLine
, cursorIdx = cursorIdx , cursorIdx = cursorIdx
, dfa = dfa , dfa = dfa
@@ -54,7 +52,6 @@ struct
, searchList = _ , searchList = _
, visualScrollColumn = _ , visualScrollColumn = _
, msgs = _ , msgs = _
, searchString
, startLine , startLine
, cursorIdx , cursorIdx
, dfa , dfa
@@ -68,7 +65,6 @@ struct
, searchList = newSearchList , searchList = newSearchList
, visualScrollColumn = newVisualScrollColumn , visualScrollColumn = newVisualScrollColumn
, msgs = newMsgs , msgs = newMsgs
, searchString = searchString
, startLine = startLine , startLine = startLine
, cursorIdx = cursorIdx , cursorIdx = cursorIdx
, dfa = dfa , dfa = dfa
@@ -96,7 +92,6 @@ struct
, searchList = _ , searchList = _
, visualScrollColumn = _ , visualScrollColumn = _
, msgs = _ , msgs = _
, searchString
, windowWidth , windowWidth
, windowHeight , windowHeight
, dfa , dfa
@@ -110,7 +105,6 @@ struct
, searchList = newSearchList , searchList = newSearchList
, visualScrollColumn = newVisualScrollColumn , visualScrollColumn = newVisualScrollColumn
, msgs = newMsgs , msgs = newMsgs
, searchString = searchString
, windowWidth = windowWidth , windowWidth = windowWidth
, windowHeight = windowHeight , windowHeight = windowHeight
, dfa = dfa , dfa = dfa
@@ -125,7 +119,6 @@ struct
, buffer , buffer
, bufferModifyTime , bufferModifyTime
, searchList , searchList
, searchString
, cursorIdx , cursorIdx
, windowWidth , windowWidth
, windowHeight , windowHeight
@@ -139,7 +132,6 @@ struct
, buffer = buffer , buffer = buffer
, bufferModifyTime = bufferModifyTime , bufferModifyTime = bufferModifyTime
, searchList = searchList , searchList = searchList
, searchString = searchString
, cursorIdx = cursorIdx , cursorIdx = cursorIdx
, windowWidth = windowWidth , windowWidth = windowWidth
, windowHeight = windowHeight , windowHeight = windowHeight
@@ -157,7 +149,6 @@ struct
, buffer = _ , buffer = _
, bufferModifyTime , bufferModifyTime
, searchList , searchList
, searchString
, cursorIdx , cursorIdx
, windowWidth , windowWidth
, windowHeight , windowHeight
@@ -171,7 +162,6 @@ struct
, buffer = newBuffer , buffer = newBuffer
, bufferModifyTime = bufferModifyTime , bufferModifyTime = bufferModifyTime
, searchList = searchList , searchList = searchList
, searchString = searchString
, cursorIdx = cursorIdx , cursorIdx = cursorIdx
, windowWidth = windowWidth , windowWidth = windowWidth
, windowHeight = windowHeight , windowHeight = windowHeight
@@ -181,19 +171,12 @@ struct
} }
end end
fun searchList fun searchList (app: app_type, newSearchList, newBuffer, newBufferModifyTime) =
( app: app_type
, newSearchList
, newBuffer
, newSearchString
, newBufferModifyTime
) =
let let
val val
{ searchList = _ { searchList = _
, buffer = _ , buffer = _
, bufferModifyTime , bufferModifyTime
, searchString = _
, msgs , msgs
, mode , mode
, cursorIdx , cursorIdx
@@ -207,7 +190,6 @@ struct
{ searchList = newSearchList { searchList = newSearchList
, buffer = newBuffer , buffer = newBuffer
, bufferModifyTime = newBufferModifyTime , bufferModifyTime = newBufferModifyTime
, searchString = newSearchString
, msgs = msgs , msgs = msgs
, mode = mode , mode = mode
, cursorIdx = cursorIdx , cursorIdx = cursorIdx

View File

@@ -31,9 +31,9 @@ struct
let let
open MailboxType open MailboxType
val {cursorIdx = origCursorIdx, searchString, ...} = app val {cursorIdx = origCursorIdx, ...} = app
val buffer = LineGap.goToStart buffer val buffer = LineGap.goToStart buffer
val initialMsg = [SEARCH (buffer, searchString, time)] val initialMsg = [SEARCH (buffer, raise Fail "searchString", time)]
in in
NormalDelete.finishAfterDeletingBuffer NormalDelete.finishAfterDeletingBuffer
(app, origCursorIdx, buffer, time, initialMsg) (app, origCursorIdx, buffer, time, initialMsg)
@@ -94,7 +94,7 @@ struct
let let
open MailboxType open MailboxType
val {cursorIdx, buffer, searchString, ...} = app val {cursorIdx, buffer, ...} = app
val buffer = LineGap.goToIdx (cursorIdx, buffer) val buffer = LineGap.goToIdx (cursorIdx, buffer)
val lineStart = Cursor.vi0 (buffer, cursorIdx) val lineStart = Cursor.vi0 (buffer, cursorIdx)
@@ -127,7 +127,7 @@ struct
loop (nextLine, buffer, count - 1) loop (nextLine, buffer, count - 1)
val buffer = LineGap.goToStart buffer val buffer = LineGap.goToStart buffer
val initialMsg = [SEARCH (buffer, searchString, time)] val initialMsg = [SEARCH (buffer, raise Fail "searchString", time)]
in in
NormalDelete.finishAfterDeletingBuffer NormalDelete.finishAfterDeletingBuffer
(app, newCursorIdx, buffer, time, initialMsg) (app, newCursorIdx, buffer, time, initialMsg)

View File

@@ -5,7 +5,6 @@ struct
fun returnToNormalMode fun returnToNormalMode
( app: app_type ( app: app_type
, newBuffer , newBuffer
, newSearchString
, newSearchList , newSearchList
, newStartLine , newStartLine
, newMode , newMode
@@ -16,7 +15,6 @@ struct
val val
{ mode = _ { mode = _
, buffer = _ , buffer = _
, searchString = _
, searchList = _ , searchList = _
, startLine = _ , startLine = _
, msgs = _ , msgs = _
@@ -30,7 +28,6 @@ struct
in in
{ mode = newMode { mode = newMode
, buffer = newBuffer , buffer = newBuffer
, searchString = newSearchString
, searchList = newSearchList , searchList = newSearchList
, startLine = newStartLine , startLine = newStartLine
, dfa = newDfa , dfa = newDfa
@@ -49,7 +46,6 @@ struct
val val
{ mode = _ { mode = _
, buffer = _ , buffer = _
, searchString
, searchList , searchList
, startLine = _ , startLine = _
, msgs = _ , msgs = _
@@ -65,7 +61,6 @@ struct
, buffer = newBuffer , buffer = newBuffer
, startLine = newStartLine , startLine = newStartLine
, msgs = newMsgs , msgs = newMsgs
, searchString = searchString
, searchList = searchList , searchList = searchList
, bufferModifyTime = bufferModifyTime , bufferModifyTime = bufferModifyTime
, windowWidth = windowWidth , windowWidth = windowWidth
@@ -81,7 +76,6 @@ struct
val val
{ mode { mode
, buffer , buffer
, searchString
, searchList = _ , searchList = _
, startLine , startLine
, msgs , msgs
@@ -98,7 +92,6 @@ struct
, buffer = buffer , buffer = buffer
, startLine = startLine , startLine = startLine
, msgs = msgs , msgs = msgs
, searchString = searchString
, bufferModifyTime = bufferModifyTime , bufferModifyTime = bufferModifyTime
, windowWidth = windowWidth , windowWidth = windowWidth
, windowHeight = windowHeight , windowHeight = windowHeight
@@ -123,7 +116,6 @@ struct
, windowHeight = _ , windowHeight = _
, msgs = _ , msgs = _
, buffer = _ , buffer = _
, searchString
, searchList , searchList
, startLine , startLine
, bufferModifyTime , bufferModifyTime
@@ -139,7 +131,6 @@ struct
, msgs = newMsgs , msgs = newMsgs
, searchList = searchList , searchList = searchList
, startLine = startLine , startLine = startLine
, searchString = searchString
, bufferModifyTime = bufferModifyTime , bufferModifyTime = bufferModifyTime
, cursorIdx = cursorIdx , cursorIdx = cursorIdx
, visualScrollColumn = visualScrollColumn , visualScrollColumn = visualScrollColumn

View File

@@ -10,7 +10,7 @@ struct
if caseSensitive then CaseSensitiveDfa.fromString searchString if caseSensitive then CaseSensitiveDfa.fromString searchString
else CaseInsensitiveDfa.fromString searchString else CaseInsensitiveDfa.fromString searchString
in in
SearchList.buildRange (buffer, searchString, cursorIdx + 1111, dfa) SearchList.buildRange (buffer, cursorIdx + 1111, dfa)
end end
fun addChr fun addChr
@@ -106,7 +106,7 @@ struct
else CaseInsensitiveDfa.fromString searchString else CaseInsensitiveDfa.fromString searchString
in in
NormalSearchModeWith.returnToNormalMode NormalSearchModeWith.returnToNormalMode
(app, buffer, searchString, tempSearchList, startLine, mode, dfa, msgs) (app, buffer, tempSearchList, startLine, mode, dfa, msgs)
end end
fun backspace fun backspace

View File

@@ -259,7 +259,7 @@ struct
fun yankInsideWord (app: app_type) = fun yankInsideWord (app: app_type) =
let let
val {buffer, cursorIdx, searchString, ...} = app val {buffer, cursorIdx, ...} = app
val buffer = LineGap.goToIdx (cursorIdx, buffer) val buffer = LineGap.goToIdx (cursorIdx, buffer)
val low = Cursor.prevWordStrict (buffer, cursorIdx, 1) val low = Cursor.prevWordStrict (buffer, cursorIdx, 1)
val high = Cursor.endOfWordStrict (buffer, cursorIdx, 1) val high = Cursor.endOfWordStrict (buffer, cursorIdx, 1)
@@ -278,7 +278,7 @@ struct
fun yankInsideWORD (app: app_type) = fun yankInsideWORD (app: app_type) =
let let
val {buffer, cursorIdx, searchString, ...} = app val {buffer, cursorIdx, ...} = app
val buffer = LineGap.goToIdx (cursorIdx, buffer) val buffer = LineGap.goToIdx (cursorIdx, buffer)
val low = Cursor.prevWORDStrict (buffer, cursorIdx, 1) val low = Cursor.prevWORDStrict (buffer, cursorIdx, 1)
val high = Cursor.endOfWORDStrict (buffer, cursorIdx, 1) val high = Cursor.endOfWORDStrict (buffer, cursorIdx, 1)

View File

@@ -159,8 +159,8 @@ struct
) )
end end
fun buildRange (buffer, searchString, finishIdx, dfa) = fun buildRange (buffer, finishIdx, dfa) =
if String.size searchString > 0 andalso Vector.length dfa > 0 then if Vector.length dfa > 0 then
rangeLoop rangeLoop
( dfa ( dfa
, #idx buffer , #idx buffer