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

(cherry picked from commit 949a6339ac)
This commit is contained in:
Martin 2025-01-23 01:00:48 +01:00
parent f0ac13f7c6
commit afceba3b43

View File

@ -98,6 +98,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;
@ -1534,6 +1535,7 @@ var
CurTextIndex: Integer; // Current Index in text
dc: HDC;
CharWidths: TPhysicalCharWidths;
CWLen: Integer;
var
LineBuffer: PChar;
@ -1547,7 +1549,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;
@ -1674,8 +1676,6 @@ var
c := 0;
e := 0;
CWLen := Length(CharWidths);
// Copy to LineBuffer (and maybe FetoBuf
if NeedExpansion then begin
j := ATokenInfo.StartPos.Logical - 1;
@ -1809,6 +1809,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