Skip to content
Snippets Groups Projects
Commit 1ea56909 authored by Benoît Minisini's avatar Benoît Minisini :church:
Browse files

TextHighlighter: Fix Paint() method.

[GB.HIGHLIGHT]
* BUG: TextHighlighter: Fix Paint() method.
parent e815d714
No related branches found
No related tags found
No related merge requests found
Pipeline #1053442248 passed
......@@ -492,7 +492,7 @@ Public Sub Paint(Text As String, X As Float, Y As Float, Optional Theme As Varia
Dim P As Integer
Dim iColor As Integer
Dim iLine As Integer
Dim XB As Integer
Dim XB As Float
Dim fCharWidth As Float
Dim LH, BW As Integer
Dim LB As Integer
......@@ -525,8 +525,8 @@ Public Sub Paint(Text As String, X As Float, Y As Float, Optional Theme As Varia
If P < Pos Then
'iLen -= Pos - P
$sToken = String.Mid$($sToken, Pos - P + 1)
P = Pos
$sToken = String.Mid$($sLine, P)
Endif
If fCharWidth Then
......@@ -535,6 +535,7 @@ Public Sub Paint(Text As String, X As Float, Y As Float, Optional Theme As Varia
X = X0 + Paint.Font.TextWidth(String.Mid($sLine, Pos, P - Pos))
Endif
X = Int(X)
iColor = $hStyle.Color
Paint.Background = iColor
If $hStyle.Bold Then
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment