fix some type errors
This commit is contained in:
@@ -732,7 +732,6 @@ struct
|
|||||||
, windowWidth
|
, windowWidth
|
||||||
, windowHeight
|
, windowHeight
|
||||||
, searchList
|
, searchList
|
||||||
, searchString
|
|
||||||
, visualScrollColumn
|
, visualScrollColumn
|
||||||
)
|
)
|
||||||
val drawMsg = Vector.concat drawMsg
|
val drawMsg = Vector.concat drawMsg
|
||||||
|
|||||||
@@ -42,7 +42,6 @@ struct
|
|||||||
, windowWidth
|
, windowWidth
|
||||||
, windowHeight
|
, windowHeight
|
||||||
, searchList
|
, searchList
|
||||||
, searchString
|
|
||||||
, visualScrollColumn
|
, visualScrollColumn
|
||||||
)
|
)
|
||||||
val drawMsg = Vector.concat drawMsg
|
val drawMsg = Vector.concat drawMsg
|
||||||
@@ -110,7 +109,6 @@ struct
|
|||||||
, newWidth
|
, newWidth
|
||||||
, newHeight
|
, newHeight
|
||||||
, searchList
|
, searchList
|
||||||
, searchString
|
|
||||||
, visualScrollColumn
|
, visualScrollColumn
|
||||||
)
|
)
|
||||||
val drawMsg = Vector.concat drawMsg
|
val drawMsg = Vector.concat drawMsg
|
||||||
@@ -156,7 +154,6 @@ struct
|
|||||||
, windowWidth
|
, windowWidth
|
||||||
, windowHeight
|
, windowHeight
|
||||||
, searchList
|
, searchList
|
||||||
, searchString
|
|
||||||
, visualScrollColumn
|
, visualScrollColumn
|
||||||
)
|
)
|
||||||
val drawMsg = Vector.concat drawMsg
|
val drawMsg = Vector.concat drawMsg
|
||||||
|
|||||||
@@ -9,7 +9,6 @@ struct
|
|||||||
, windowWidth
|
, windowWidth
|
||||||
, windowHeight
|
, windowHeight
|
||||||
, searchList
|
, searchList
|
||||||
, searchString
|
|
||||||
, bufferModifyTime
|
, bufferModifyTime
|
||||||
, visualScrollColumn
|
, visualScrollColumn
|
||||||
, ...
|
, ...
|
||||||
@@ -26,7 +25,6 @@ struct
|
|||||||
, windowWidth
|
, windowWidth
|
||||||
, windowHeight
|
, windowHeight
|
||||||
, searchList
|
, searchList
|
||||||
, searchString
|
|
||||||
, visualScrollColumn
|
, visualScrollColumn
|
||||||
)
|
)
|
||||||
val drawMsg = Vector.concat drawMsg
|
val drawMsg = Vector.concat drawMsg
|
||||||
@@ -55,7 +53,6 @@ struct
|
|||||||
, windowWidth
|
, windowWidth
|
||||||
, windowHeight
|
, windowHeight
|
||||||
, searchList
|
, searchList
|
||||||
, searchString
|
|
||||||
, bufferModifyTime
|
, bufferModifyTime
|
||||||
, visualScrollColumn = prevScrollColumn
|
, visualScrollColumn = prevScrollColumn
|
||||||
, startLine = prevLineNumber
|
, startLine = prevLineNumber
|
||||||
@@ -92,7 +89,6 @@ struct
|
|||||||
, windowWidth
|
, windowWidth
|
||||||
, windowHeight
|
, windowHeight
|
||||||
, searchList
|
, searchList
|
||||||
, searchString
|
|
||||||
, visualScrollColumn
|
, visualScrollColumn
|
||||||
)
|
)
|
||||||
val drawMsg = Vector.concat drawMsg
|
val drawMsg = Vector.concat drawMsg
|
||||||
@@ -123,7 +119,6 @@ struct
|
|||||||
, visualScrollColumn = prevScrollColumn
|
, visualScrollColumn = prevScrollColumn
|
||||||
, startLine = prevLineNumber
|
, startLine = prevLineNumber
|
||||||
, searchList
|
, searchList
|
||||||
, searchString
|
|
||||||
, bufferModifyTime
|
, bufferModifyTime
|
||||||
, ...
|
, ...
|
||||||
} = app
|
} = app
|
||||||
@@ -162,7 +157,6 @@ struct
|
|||||||
, windowWidth
|
, windowWidth
|
||||||
, windowHeight
|
, windowHeight
|
||||||
, searchList
|
, searchList
|
||||||
, searchString
|
|
||||||
, visualScrollColumn
|
, visualScrollColumn
|
||||||
)
|
)
|
||||||
val drawMsg = Vector.concat drawMsg
|
val drawMsg = Vector.concat drawMsg
|
||||||
@@ -235,7 +229,6 @@ struct
|
|||||||
, buffer
|
, buffer
|
||||||
, startLine = prevLineNumber
|
, startLine = prevLineNumber
|
||||||
, searchList
|
, searchList
|
||||||
, searchString
|
|
||||||
, bufferModifyTime
|
, bufferModifyTime
|
||||||
, visualScrollColumn = prevScrollColumn
|
, visualScrollColumn = prevScrollColumn
|
||||||
, ...
|
, ...
|
||||||
@@ -330,7 +323,6 @@ struct
|
|||||||
, buffer
|
, buffer
|
||||||
, startLine = prevLineNumber
|
, startLine = prevLineNumber
|
||||||
, searchList
|
, searchList
|
||||||
, searchString
|
|
||||||
, bufferModifyTime
|
, bufferModifyTime
|
||||||
, visualScrollColumn = prevScrollColumn
|
, visualScrollColumn = prevScrollColumn
|
||||||
, ...
|
, ...
|
||||||
@@ -368,7 +360,6 @@ struct
|
|||||||
, windowWidth
|
, windowWidth
|
||||||
, windowHeight
|
, windowHeight
|
||||||
, searchList
|
, searchList
|
||||||
, searchString
|
|
||||||
, visualScrollColumn
|
, visualScrollColumn
|
||||||
)
|
)
|
||||||
val drawMsg = Vector.concat drawMsg
|
val drawMsg = Vector.concat drawMsg
|
||||||
@@ -400,7 +391,6 @@ struct
|
|||||||
, windowHeight
|
, windowHeight
|
||||||
, startLine = prevLineNumber
|
, startLine = prevLineNumber
|
||||||
, searchList
|
, searchList
|
||||||
, searchString
|
|
||||||
, bufferModifyTime
|
, bufferModifyTime
|
||||||
, visualScrollColumn = prevScrollColumn
|
, visualScrollColumn = prevScrollColumn
|
||||||
, ...
|
, ...
|
||||||
@@ -430,7 +420,6 @@ struct
|
|||||||
, windowWidth
|
, windowWidth
|
||||||
, windowHeight
|
, windowHeight
|
||||||
, searchList
|
, searchList
|
||||||
, searchString
|
|
||||||
, visualScrollColumn
|
, visualScrollColumn
|
||||||
)
|
)
|
||||||
val drawMsg = Vector.concat drawMsg
|
val drawMsg = Vector.concat drawMsg
|
||||||
|
|||||||
@@ -67,7 +67,6 @@ struct
|
|||||||
, floatWindowWidth
|
, floatWindowWidth
|
||||||
, floatWindowHeight
|
, floatWindowHeight
|
||||||
, tempSearchList
|
, tempSearchList
|
||||||
, searchString
|
|
||||||
, visualScrollColumn
|
, visualScrollColumn
|
||||||
, initialTextAcc
|
, initialTextAcc
|
||||||
)
|
)
|
||||||
@@ -138,7 +137,6 @@ struct
|
|||||||
, floatWindowWidth
|
, floatWindowWidth
|
||||||
, floatWindowHeight
|
, floatWindowHeight
|
||||||
, tempSearchList
|
, tempSearchList
|
||||||
, searchString
|
|
||||||
, visualScrollColumn
|
, visualScrollColumn
|
||||||
, initialTextAcc
|
, initialTextAcc
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -246,51 +246,7 @@ struct
|
|||||||
else
|
else
|
||||||
PersistentVector.empty
|
PersistentVector.empty
|
||||||
|
|
||||||
fun loopNextMatch (pos, searchList, count) =
|
fun nextMatch (cursorIdx, searchList, count) = raise Fail "todo: reimplement"
|
||||||
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) =
|
fun prevMatch (cursorIdx, searchList, count) = raise Fail "todo: reimplement"
|
||||||
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
|
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user