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,7 +236,11 @@ struct
|
|||||||
Utils.makeCursor (posX, posY, env) :: acc
|
Utils.makeCursor (posX, posY, env) :: acc
|
||||||
else
|
else
|
||||||
acc
|
acc
|
||||||
|
val nextLineNumber = lineNumber + 1
|
||||||
in
|
in
|
||||||
|
if nextLineNumber > #lastLineNumber env then
|
||||||
|
acc
|
||||||
|
else
|
||||||
build
|
build
|
||||||
( pos + 1
|
( pos + 1
|
||||||
, str
|
, str
|
||||||
@@ -246,7 +250,7 @@ struct
|
|||||||
, #startX env
|
, #startX env
|
||||||
, posY + TC.ySpace
|
, posY + TC.ySpace
|
||||||
, 0
|
, 0
|
||||||
, lineNumber + 1
|
, nextLineNumber
|
||||||
, absIdx + 1
|
, absIdx + 1
|
||||||
, cursorIdx
|
, cursorIdx
|
||||||
, env
|
, env
|
||||||
|
|||||||
Reference in New Issue
Block a user