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