mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-13 14:19:11 +02:00
synedit: dont highlight a line when highlight has not colors set
git-svn-id: trunk@17545 -
This commit is contained in:
parent
177d9aa195
commit
285687c543
@ -46,6 +46,7 @@ type
|
||||
FHighlightedLine: Integer;
|
||||
protected
|
||||
procedure DoMarkupLineHighlightInfoChange(Sender: TObject);
|
||||
function HasLineHighlight: Boolean;
|
||||
public
|
||||
constructor Create(ASynEdit: TCustomControl);
|
||||
destructor Destroy; override;
|
||||
@ -77,6 +78,13 @@ begin
|
||||
InvalidateSynLines(FHighlightedLine, FHighlightedLine);
|
||||
end;
|
||||
|
||||
function TSynEditMarkupSpecialLine.HasLineHighlight: Boolean;
|
||||
begin
|
||||
Result :=
|
||||
(FMarkupLineHighlightInfo.Background <> clNone) or
|
||||
(FMarkupLineHighlightInfo.Foreground <> clNone);
|
||||
end;
|
||||
|
||||
constructor TSynEditMarkupSpecialLine.Create(ASynEdit: TCustomControl);
|
||||
begin
|
||||
inherited Create(ASynEdit);
|
||||
@ -125,7 +133,7 @@ begin
|
||||
// if it is so then use own bg,fg colors to setup highlight
|
||||
if not FSpecialLine then
|
||||
begin
|
||||
if FHighlightedLine = ARow then
|
||||
if (FHighlightedLine = ARow) and HasLineHighlight then
|
||||
begin
|
||||
FSpecialLine := True;
|
||||
MarkupInfo.Foreground := FMarkupLineHighlightInfo.Foreground;
|
||||
|
Loading…
Reference in New Issue
Block a user