mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-13 23:49:13 +02:00
SynEdit: Return past-end-of line attribute in multi line comments // support for p-eol attibute (missed file)
git-svn-id: trunk@43421 -
This commit is contained in:
parent
82085e2c7d
commit
7187c0477d
@ -383,8 +383,13 @@ begin
|
|||||||
ATokenInfo.PhysicalClipEnd := ATokenInfo.EndPos.Physical;
|
ATokenInfo.PhysicalClipEnd := ATokenInfo.EndPos.Physical;
|
||||||
ATokenInfo.RtlInfo.IsRtl := False;
|
ATokenInfo.RtlInfo.IsRtl := False;
|
||||||
FMarkupTokenAttr.Clear;
|
FMarkupTokenAttr.Clear;
|
||||||
FMarkupTokenAttr.Foreground := FForegroundColor;
|
if ATokenInfo.Attr <> nil then begin
|
||||||
FMarkupTokenAttr.Background := FBackgroundColor;
|
FMarkupTokenAttr.Assign(ATokenInfo.Attr);
|
||||||
|
end
|
||||||
|
else begin
|
||||||
|
FMarkupTokenAttr.Foreground := FForegroundColor;
|
||||||
|
FMarkupTokenAttr.Background := FBackgroundColor;
|
||||||
|
end;
|
||||||
|
|
||||||
ATokenInfo.ExpandedExtraBytes := 0;
|
ATokenInfo.ExpandedExtraBytes := 0;
|
||||||
ATokenInfo.HasTabs := False;
|
ATokenInfo.HasTabs := False;
|
||||||
@ -456,6 +461,9 @@ function TLazSynPaintTokenBreaker.GetNextHighlighterTokenFromView(out
|
|||||||
FCurViewCurTokenStartPos := FCurViewScannerPos;
|
FCurViewCurTokenStartPos := FCurViewScannerPos;
|
||||||
while FCurViewToken.TokenLength = 0 do begin // Todo: is SyncroEd-test a zero size token is returned
|
while FCurViewToken.TokenLength = 0 do begin // Todo: is SyncroEd-test a zero size token is returned
|
||||||
Result := FDisplayView.GetNextHighlighterToken(FCurViewToken);
|
Result := FDisplayView.GetNextHighlighterToken(FCurViewToken);
|
||||||
|
if not Result then
|
||||||
|
FCurViewToken.TokenAttr := nil;
|
||||||
|
Result := Result and (FCurViewToken.TokenStart <> nil); // False for end of line token
|
||||||
if not Result then begin
|
if not Result then begin
|
||||||
FCurViewToken.TokenLength := -1;
|
FCurViewToken.TokenLength := -1;
|
||||||
exit;
|
exit;
|
||||||
@ -665,6 +673,12 @@ begin
|
|||||||
Result := MaybeFetchToken; // Get token from View/Highlighter
|
Result := MaybeFetchToken; // Get token from View/Highlighter
|
||||||
if not Result then begin
|
if not Result then begin
|
||||||
ATokenInfo.StartPos := FCurViewScannerPos;
|
ATokenInfo.StartPos := FCurViewScannerPos;
|
||||||
|
if FCurViewToken.TokenAttr <> nil then begin
|
||||||
|
InitSynAttr(FCurViewAttr, FCurViewToken.TokenAttr, FCurViewCurTokenStartPos);
|
||||||
|
ATokenInfo.Attr := FCurViewAttr;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
ATokenInfo.Attr := nil;
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user