TextEditor: Fix a possible crash while highlighting.

[GB.FORM.EDITOR]
* BUG: TextEditor: Fix a possible crash while highlighting.
This commit is contained in:
gambas 2021-03-01 02:14:40 +01:00 committed by Christof Thalhofer
parent 30b0f835e3
commit 10c7e236dc

View file

@ -986,7 +986,7 @@ Public Sub HighlightUntil(Y As Integer)
If Not StartHighlight() Then Return
iNextFirst = -1
For L = $iFirstInvalidHighlight To Y
For L = $iFirstInvalidHighlight To Min(Y, Lines.Max)
If L = $iDoNotHighlightLine And If Info(L).Modified Then
If iNextFirst < 0 Then iNextFirst = L
Continue