aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Editor.cxx
diff options
context:
space:
mode:
authornyamatongwe <unknown>2011-04-27 12:57:15 +1000
committernyamatongwe <unknown>2011-04-27 12:57:15 +1000
commit56ed1e9e1c7f02aa7a8110c3b084690822e334c5 (patch)
treef2f6a13a7287d40121bf3078388276c98e9f34c8 /src/Editor.cxx
parentfaf8032d98758218e2ae4dd1380aa6e4ecded41d (diff)
downloadscintilla-mirror-56ed1e9e1c7f02aa7a8110c3b084690822e334c5.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