SynEdit: Textdrawer, fixed painting gaps past EOL (don't show special chars in gap before fold-indicator)

This commit is contained in:
Martin 2025-01-23 01:00:48 +01:00
parent a2153c9bcb
commit 949a6339ac

View File

@ -99,6 +99,7 @@ type
): Boolean;
function GetNextHighlighterTokenEx(out ATokenInfo: TLazSynDisplayTokenInfoEx): Boolean;
property CharWidths: TPhysicalCharWidths read FCharWidths;
property CharWidthsLen: integer read FCharWidthsLen;
property ForegroundColor: TColor read FForegroundColor write FForegroundColor;
property BackgroundColor: TColor read FBackgroundColor write FBackgroundColor;
property SpaceExtraByteCount: Integer read FSpaceExtraByteCount write FSpaceExtraByteCount;
@ -1549,6 +1550,7 @@ var
CurTextIndex: Integer; // Current Index in text
dc: HDC;
CharWidths: TPhysicalCharWidths;
CWLen: Integer;
var
LineBuffer: PChar;
@ -1562,7 +1564,7 @@ var
Attr: TSynSelectedColorMergeResult;
TxtFlags: Integer;
tok: TRect;
c, i, j, k, e, Len, CWLen: Integer;
c, i, j, k, e, Len: Integer;
pl, pt: PChar;
TxtLeft: Integer;
NeedExpansion, NeedTransform: Boolean;
@ -1689,8 +1691,6 @@ var
c := 0;
e := 0;
CWLen := Length(CharWidths);
// Copy to LineBuffer (and maybe FetoBuf
if NeedExpansion then begin
j := ATokenInfo.StartPos.Logical - 1;
@ -1828,6 +1828,7 @@ var
CharWidths := nil; // keep refcnt = 1 -- in case they get resized
FTokenBreaker.SetHighlighterTokensLine(TV + CurLine, CurTextIndex);
CharWidths := FTokenBreaker.CharWidths;
CWLen := FTokenBreaker.CharWidthsLen;
fMarkupManager.PrepareMarkupForRow(CurTextIndex+1);
DividerInfo := DisplayView.GetDrawDividerInfo; // May call HL.SetRange