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

View File

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

View File

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