aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Editor.cxx
diff options
context:
space:
mode:
authornyamatongwe <devnull@localhost>2011-04-27 12:57:15 +1000
committernyamatongwe <devnull@localhost>2011-04-27 12:57:15 +1000
commit9b21d78a1d28b946a3bebc24a87cb80b43c5270d (patch)
tree4e2b42ef606e2226156995ec35cfa4b61f864370 /src/Editor.cxx
parentbd7aa0cf9047940c75da9c9591d46a8dbfa97803 (diff)
downloadscintilla-mirror-9b21d78a1d28b946a3bebc24a87cb80b43c5270d.tar.gz
Optimize fold marker highlight. Feature #3282649.
From Jérôme LAFORGE.
Diffstat (limited to 'src/Editor.cxx')
-rw-r--r--src/Editor.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx
index 05531a650..afeffc86f 100644
--- a/src/Editor.cxx
+++ b/src/Editor.cxx
@@ -1730,7 +1730,9 @@ void Editor::PaintSelMargin(Surface *surfWindow, PRectangle &rc) {
}
}
if (highlightDelimiter.isEnabled && (vs.ms[margin].mask & SC_MASK_FOLDERS)) {
- pdoc->GetHighlightDelimiters(pdoc->LineFromPosition(CurrentPosition()), highlightDelimiter);
+ int lineBack = cs.DocFromDisplay(topLine);
+ int lineFront = cs.DocFromDisplay(((rcMargin.bottom - rcMargin.top) / vs.lineHeight) + topLine) + 1;
+ pdoc->GetHighlightDelimiters(highlightDelimiter, pdoc->LineFromPosition(CurrentPosition()), lineBack, lineFront);
}
// Old code does not know about new markers needed to distinguish all cases