mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-21 21:59:18 +02:00
SynEdit: speed up / skip nodes that do not have outlining
git-svn-id: trunk@58636 -
This commit is contained in:
parent
8ca82403a0
commit
323f78d041
@ -632,6 +632,7 @@ var
|
|||||||
var
|
var
|
||||||
lKeepLevel: Boolean;
|
lKeepLevel: Boolean;
|
||||||
LastNode: TSynFoldNodeInfo;
|
LastNode: TSynFoldNodeInfo;
|
||||||
|
cnf: TSynCustomFoldConfig;
|
||||||
begin
|
begin
|
||||||
lLineIdx := ToIdx(pRow);
|
lLineIdx := ToIdx(pRow);
|
||||||
fNestList.Line := lLineIdx;
|
fNestList.Line := lLineIdx;
|
||||||
@ -645,6 +646,11 @@ begin
|
|||||||
lLvl := 0;
|
lLvl := 0;
|
||||||
i := 0; // starting at the node with the lowest line number
|
i := 0; // starting at the node with the lowest line number
|
||||||
while i < fNestList.Count do begin
|
while i < fNestList.Count do begin
|
||||||
|
cnf := TSynCustomFoldHighlighter(Highlighter).FoldConfig[PtrInt(fNestList.NodeFoldType[i])];
|
||||||
|
if (not cnf.Enabled) or not(fmOutline in cnf.Modes) then begin
|
||||||
|
inc(i);
|
||||||
|
continue;
|
||||||
|
end;
|
||||||
lCurNode := fNestList.HLNode[i];
|
lCurNode := fNestList.HLNode[i];
|
||||||
// sanity check
|
// sanity check
|
||||||
Assert(sfaOpen in lCurNode.FoldAction, 'no sfaOpen in lCurNode.FoldAction');
|
Assert(sfaOpen in lCurNode.FoldAction, 'no sfaOpen in lCurNode.FoldAction');
|
||||||
|
Loading…
Reference in New Issue
Block a user