From 323f78d041979435f7d476e158003837fa1c6485 Mon Sep 17 00:00:00 2001 From: martin Date: Thu, 26 Jul 2018 01:51:05 +0000 Subject: [PATCH] SynEdit: speed up / skip nodes that do not have outlining git-svn-id: trunk@58636 - --- components/synedit/syneditmarkupfoldcoloring.pas | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/components/synedit/syneditmarkupfoldcoloring.pas b/components/synedit/syneditmarkupfoldcoloring.pas index bcadb3caaf..fab849fe15 100644 --- a/components/synedit/syneditmarkupfoldcoloring.pas +++ b/components/synedit/syneditmarkupfoldcoloring.pas @@ -632,6 +632,7 @@ var var lKeepLevel: Boolean; LastNode: TSynFoldNodeInfo; + cnf: TSynCustomFoldConfig; begin lLineIdx := ToIdx(pRow); fNestList.Line := lLineIdx; @@ -645,6 +646,11 @@ begin lLvl := 0; i := 0; // starting at the node with the lowest line number 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]; // sanity check Assert(sfaOpen in lCurNode.FoldAction, 'no sfaOpen in lCurNode.FoldAction');