mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-01 21:40:25 +02:00
SynEdit: TextDrawer, paint divider lines only for last wrapped line
This commit is contained in:
parent
2a874e1c87
commit
1f18a0d57d
@ -60,6 +60,7 @@ type
|
||||
FCharWidthsLen: Integer;
|
||||
FCurTxtLineIdx : Integer;
|
||||
FCurLineByteLen: Integer;
|
||||
FIsLastViewedSubLine: Boolean;
|
||||
|
||||
// Fields for GetNextHighlighterTokenFromView
|
||||
// Info about the token (from highlighter)
|
||||
@ -356,6 +357,7 @@ begin
|
||||
FNextMarkupLogPos := -1;
|
||||
FCurMarkupState := cmPreInit;
|
||||
FCurTxtLineIdx := ARealLine;
|
||||
FIsLastViewedSubLine := FCurLineByteLen >= FCharWidthsLen;
|
||||
end;
|
||||
|
||||
function TLazSynPaintTokenBreaker.GetNextHighlighterTokenEx(out
|
||||
@ -1831,15 +1833,17 @@ var
|
||||
CWLen := FTokenBreaker.CharWidthsLen;
|
||||
fMarkupManager.PrepareMarkupForRow(CurTextIndex+1);
|
||||
|
||||
DividerInfo := DisplayView.GetDrawDividerInfo; // May call HL.SetRange
|
||||
if (DividerInfo.Color <> clNone) and (nRightEdge >= FTextBounds.Left) then
|
||||
begin
|
||||
ypos := rcToken.Bottom - 1;
|
||||
cl := DividerInfo.Color;
|
||||
if cl = clDefault then
|
||||
cl := RightEdgeColor;
|
||||
fTextDrawer.DrawLine(nRightEdge, ypos, FTextBounds.Left - 1, ypos, cl);
|
||||
dec(rcToken.Bottom);
|
||||
if FTokenBreaker.FIsLastViewedSubLine then begin
|
||||
DividerInfo := DisplayView.GetDrawDividerInfo; // May call HL.SetRange
|
||||
if (DividerInfo.Color <> clNone) and (nRightEdge >= FTextBounds.Left) then
|
||||
begin
|
||||
ypos := rcToken.Bottom - 1;
|
||||
cl := DividerInfo.Color;
|
||||
if cl = clDefault then
|
||||
cl := RightEdgeColor;
|
||||
fTextDrawer.DrawLine(nRightEdge, ypos, FTextBounds.Left - 1, ypos, cl);
|
||||
dec(rcToken.Bottom);
|
||||
end;
|
||||
end;
|
||||
|
||||
while FTokenBreaker.GetNextHighlighterTokenEx(TokenInfoEx) do begin
|
||||
|
Loading…
Reference in New Issue
Block a user