fix some type errors
This commit is contained in:
@@ -732,7 +732,6 @@ struct
|
||||
, windowWidth
|
||||
, windowHeight
|
||||
, searchList
|
||||
, searchString
|
||||
, visualScrollColumn
|
||||
)
|
||||
val drawMsg = Vector.concat drawMsg
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -67,7 +67,6 @@ struct
|
||||
, floatWindowWidth
|
||||
, floatWindowHeight
|
||||
, tempSearchList
|
||||
, searchString
|
||||
, visualScrollColumn
|
||||
, initialTextAcc
|
||||
)
|
||||
@@ -138,7 +137,6 @@ struct
|
||||
, floatWindowWidth
|
||||
, floatWindowHeight
|
||||
, tempSearchList
|
||||
, searchString
|
||||
, visualScrollColumn
|
||||
, initialTextAcc
|
||||
)
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user