in TextBuilderWithHighlight.build, check when we encounter a \n if we would be past the last line, and return the acc if so, or else continue looping
This commit is contained in:
@@ -236,23 +236,27 @@ struct
|
|||||||
Utils.makeCursor (posX, posY, env) :: acc
|
Utils.makeCursor (posX, posY, env) :: acc
|
||||||
else
|
else
|
||||||
acc
|
acc
|
||||||
|
val nextLineNumber = lineNumber + 1
|
||||||
in
|
in
|
||||||
build
|
if nextLineNumber > #lastLineNumber env then
|
||||||
( pos + 1
|
acc
|
||||||
, str
|
else
|
||||||
, stl
|
build
|
||||||
, line
|
( pos + 1
|
||||||
, ltl
|
, str
|
||||||
, #startX env
|
, stl
|
||||||
, posY + TC.ySpace
|
, line
|
||||||
, 0
|
, ltl
|
||||||
, lineNumber + 1
|
, #startX env
|
||||||
, absIdx + 1
|
, posY + TC.ySpace
|
||||||
, cursorIdx
|
, 0
|
||||||
, env
|
, nextLineNumber
|
||||||
, acc
|
, absIdx + 1
|
||||||
, searchPos
|
, cursorIdx
|
||||||
)
|
, env
|
||||||
|
, acc
|
||||||
|
, searchPos
|
||||||
|
)
|
||||||
end
|
end
|
||||||
| chr =>
|
| chr =>
|
||||||
if column < #scrollColumnStart env then
|
if column < #scrollColumnStart env then
|
||||||
|
|||||||
Reference in New Issue
Block a user