SynEdit: fix special line markup, broken in revision 53988 #41861e5d2c

git-svn-id: trunk@54032 -
This commit is contained in:
martin 2017-01-29 21:42:42 +00:00
parent 1de2cbf586
commit 936f671ee4
3 changed files with 9 additions and 2 deletions

View File

@ -73,6 +73,7 @@ type
procedure SetLinesInWindow(const AValue : Integer); virtual; procedure SetLinesInWindow(const AValue : Integer); virtual;
procedure SetCaret(const AValue : TSynEditCaret); virtual; procedure SetCaret(const AValue : TSynEditCaret); virtual;
function IsTempDisabled: boolean;
procedure DoEnabledChanged(Sender: TObject); virtual; procedure DoEnabledChanged(Sender: TObject); virtual;
procedure DoCaretChanged(Sender: TObject); virtual; procedure DoCaretChanged(Sender: TObject); virtual;
procedure DoTopLineChanged(OldTopLine : Integer); virtual; procedure DoTopLineChanged(OldTopLine : Integer); virtual;
@ -284,6 +285,11 @@ begin
FCaret.AddChangeHandler(@DoCaretChanged); FCaret.AddChangeHandler(@DoCaretChanged);
end; end;
function TSynEditMarkup.IsTempDisabled: boolean;
begin
Result := FTempEnable > 0;
end;
procedure TSynEditMarkup.DoEnabledChanged(Sender: TObject); procedure TSynEditMarkup.DoEnabledChanged(Sender: TObject);
begin begin
end; end;

View File

@ -779,7 +779,7 @@ end;
function TSynEditMarkupIfDefBase.RealEnabled: Boolean; function TSynEditMarkupIfDefBase.RealEnabled: Boolean;
begin begin
Result := inherited and HasEnabledMarkup; Result := Enabled and (not IsTempDisabled) and HasEnabledMarkup;
end; end;
{ TSynRefCountedDictIfDef } { TSynRefCountedDictIfDef }

View File

@ -130,7 +130,7 @@ end;
function TSynEditMarkupSpecialLine.RealEnabled: Boolean; function TSynEditMarkupSpecialLine.RealEnabled: Boolean;
begin begin
Result := inherited and Result := Enabled and (not IsTempDisabled) and
(Assigned(FOnSpecialLineMarkup) or Assigned(FOnSpecialLineColors) or (Assigned(FOnSpecialLineMarkup) or Assigned(FOnSpecialLineColors) or
HasLineHighlight HasLineHighlight
); );
@ -190,6 +190,7 @@ begin
MarkupInfo.Assign(FMarkupLineHighlightInfo); MarkupInfo.Assign(FMarkupLineHighlightInfo);
end; end;
end; end;
debugln(['prepare', FSpecialLine, MarkupInfo.Background]);
end; end;
function TSynEditMarkupSpecialLine.GetMarkupAttributeAtRowCol(const aRow: Integer; function TSynEditMarkupSpecialLine.GetMarkupAttributeAtRowCol(const aRow: Integer;