mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-25 15:09:24 +02:00
SynEdit, Folding: Clear folds, if highlighter changes
git-svn-id: trunk@24475 -
This commit is contained in:
parent
c1e827dafb
commit
fd3a7b5ef5
@ -258,6 +258,7 @@ type
|
||||
function GetTextIndex(index : Integer) : Integer;
|
||||
function GetFoldType(index : Integer) : TSynEditCodeFoldType;
|
||||
function IsFolded(index : integer) : Boolean; // TextIndex
|
||||
procedure SetHighLighter(const AValue: TSynCustomHighlighter);
|
||||
procedure SetTopLine(const ALine : integer);
|
||||
function GetTopTextIndex : integer;
|
||||
procedure SetTopTextIndex(const AIndex : integer);
|
||||
@ -368,7 +369,7 @@ type
|
||||
property OnFoldChanged: TFoldChangedEvent (* reports 1-based line *) {TODO: synedit expects 0 based }
|
||||
read fOnFoldChanged write fOnFoldChanged;
|
||||
property HighLighter: TSynCustomHighlighter read GetHighLighter
|
||||
write FHighLighter;
|
||||
write SetHighLighter;
|
||||
end;
|
||||
|
||||
implementation
|
||||
@ -2886,6 +2887,14 @@ begin
|
||||
Result := fFoldTree.FindFoldForLine(index+1).IsInFold;
|
||||
end;
|
||||
|
||||
procedure TSynEditFoldedView.SetHighLighter(const AValue: TSynCustomHighlighter
|
||||
);
|
||||
begin
|
||||
if FHighLighter = AValue then exit;
|
||||
FHighLighter := AValue;
|
||||
UnfoldAll;
|
||||
end;
|
||||
|
||||
(* Folding *)
|
||||
|
||||
procedure TSynEditFoldedView.FoldAtLine(AStartLine : Integer;
|
||||
|
Loading…
Reference in New Issue
Block a user