diff --git a/fcore/normal-mode/make-normal-delete.sml b/fcore/normal-mode/make-normal-delete.sml index 6bb611a..a15404a 100644 --- a/fcore/normal-mode/make-normal-delete.sml +++ b/fcore/normal-mode/make-normal-delete.sml @@ -732,7 +732,6 @@ struct , windowWidth , windowHeight , searchList - , searchString , visualScrollColumn ) val drawMsg = Vector.concat drawMsg diff --git a/fcore/normal-mode/normal-finish.sml b/fcore/normal-mode/normal-finish.sml index 10859f8..4887094 100644 --- a/fcore/normal-mode/normal-finish.sml +++ b/fcore/normal-mode/normal-finish.sml @@ -42,7 +42,6 @@ struct , windowWidth , windowHeight , searchList - , searchString , visualScrollColumn ) val drawMsg = Vector.concat drawMsg @@ -110,7 +109,6 @@ struct , newWidth , newHeight , searchList - , searchString , visualScrollColumn ) val drawMsg = Vector.concat drawMsg @@ -156,7 +154,6 @@ struct , windowWidth , windowHeight , searchList - , searchString , visualScrollColumn ) val drawMsg = Vector.concat drawMsg diff --git a/fcore/normal-mode/normal-move.sml b/fcore/normal-mode/normal-move.sml index c53ffe1..895824c 100644 --- a/fcore/normal-mode/normal-move.sml +++ b/fcore/normal-mode/normal-move.sml @@ -9,7 +9,6 @@ struct , windowWidth , windowHeight , searchList - , searchString , bufferModifyTime , visualScrollColumn , ... @@ -26,7 +25,6 @@ struct , windowWidth , windowHeight , searchList - , searchString , visualScrollColumn ) val drawMsg = Vector.concat drawMsg @@ -55,7 +53,6 @@ struct , windowWidth , windowHeight , searchList - , searchString , bufferModifyTime , visualScrollColumn = prevScrollColumn , startLine = prevLineNumber @@ -92,7 +89,6 @@ struct , windowWidth , windowHeight , searchList - , searchString , visualScrollColumn ) val drawMsg = Vector.concat drawMsg @@ -123,7 +119,6 @@ struct , visualScrollColumn = prevScrollColumn , startLine = prevLineNumber , searchList - , searchString , bufferModifyTime , ... } = app @@ -162,7 +157,6 @@ struct , windowWidth , windowHeight , searchList - , searchString , visualScrollColumn ) val drawMsg = Vector.concat drawMsg @@ -235,7 +229,6 @@ struct , buffer , startLine = prevLineNumber , searchList - , searchString , bufferModifyTime , visualScrollColumn = prevScrollColumn , ... @@ -330,7 +323,6 @@ struct , buffer , startLine = prevLineNumber , searchList - , searchString , bufferModifyTime , visualScrollColumn = prevScrollColumn , ... @@ -368,7 +360,6 @@ struct , windowWidth , windowHeight , searchList - , searchString , visualScrollColumn ) val drawMsg = Vector.concat drawMsg @@ -400,7 +391,6 @@ struct , windowHeight , startLine = prevLineNumber , searchList - , searchString , bufferModifyTime , visualScrollColumn = prevScrollColumn , ... @@ -430,7 +420,6 @@ struct , windowWidth , windowHeight , searchList - , searchString , visualScrollColumn ) val drawMsg = Vector.concat drawMsg diff --git a/fcore/normal-mode/normal-search-finish.sml b/fcore/normal-mode/normal-search-finish.sml index 0624863..3f0c05a 100644 --- a/fcore/normal-mode/normal-search-finish.sml +++ b/fcore/normal-mode/normal-search-finish.sml @@ -67,7 +67,6 @@ struct , floatWindowWidth , floatWindowHeight , tempSearchList - , searchString , visualScrollColumn , initialTextAcc ) @@ -138,7 +137,6 @@ struct , floatWindowWidth , floatWindowHeight , tempSearchList - , searchString , visualScrollColumn , initialTextAcc ) diff --git a/fcore/search-list.sml b/fcore/search-list.sml index aae2917..fdcc47b 100644 --- a/fcore/search-list.sml +++ b/fcore/search-list.sml @@ -246,51 +246,7 @@ struct else PersistentVector.empty - fun loopNextMatch (pos, searchList, count) = - if count = 0 then - Vector.sub (searchList, pos) - else - let - val pos = pos + 1 - val pos = if pos < Vector.length searchList then pos else 0 - val count = count - 1 - in - loopNextMatch (pos, searchList, count) - end + fun nextMatch (cursorIdx, searchList, count) = raise Fail "todo: reimplement" - fun nextMatch (cursorIdx, searchList, count) = - if Vector.length searchList = 0 then - ~1 - else - let - val pos = BinSearch.equalOrMore (cursorIdx + 1, searchList) - val pos = if pos = ~1 then 0 else pos - val count = count - 1 - in - loopNextMatch (pos, searchList, count) - end - - fun loopPrevMatch (pos, searchList, count) = - if count = 0 then - Vector.sub (searchList, pos) - else - let - val pos = pos - 1 - val pos = if pos < 0 then Vector.length searchList - 1 else pos - val count = count - 1 - in - loopPrevMatch (pos, searchList, count) - end - - fun prevMatch (cursorIdx, searchList, count) = - if Vector.length searchList = 0 then - ~1 - else - let - val pos = BinSearch.equalOrLess (cursorIdx - 1, searchList) - val pos = if pos = ~1 then Vector.length searchList - 1 else pos - val count = count - 1 - in - loopPrevMatch (pos, searchList, count) - end + fun prevMatch (cursorIdx, searchList, count) = raise Fail "todo: reimplement" end