TextEditor: Checking the Limit property of a line now highlights until that line.

[GB.FORM.EDITOR]
* BUG: TextEditor: Checking the Limit property of a line now highlights until that line.
This commit is contained in:
gambas 2021-03-01 18:31:32 +01:00 committed by Christof Thalhofer
parent 10c7e236dc
commit 084a2de23c
3 changed files with 11 additions and 2 deletions

View file

@ -978,15 +978,19 @@ Public Sub HighlightUntil(Y As Integer)
If $bHighlighting Then Return
Y = Min(Y, Lines.Max)
If $iNoHighlight Then
$cHighlightLater[Y] = True
Return
Endif
If $iFirstInvalidHighlight > Y Then Return
If Not StartHighlight() Then Return
iNextFirst = -1
For L = $iFirstInvalidHighlight To Min(Y, Lines.Max)
For L = $iFirstInvalidHighlight To Y
If L = $iDoNotHighlightLine And If Info(L).Modified Then
If iNextFirst < 0 Then iNextFirst = L
Continue

View file

@ -3606,6 +3606,7 @@ Public Sub FindNextLimit(Y As Integer) As Integer
Do
Inc Y
If Y > $hDoc.Max Then Return -1
$hDoc.HighlightUntil(Y)
If $hDoc.Info(Y).Limit Then Return Y
Loop

View file

@ -70,7 +70,11 @@ End
Private Function Limit_Read() As Boolean
Return GetDoc().Info(_Line).Limit
Dim hDoc As CDocument
hDoc = GetDoc()
hDoc.HighlightUntil(_Line)
Return hDoc.Info(_Line).Limit
End