diff options
author | nyamatongwe <devnull@localhost> | 2011-04-27 12:57:15 +1000 |
---|---|---|
committer | nyamatongwe <devnull@localhost> | 2011-04-27 12:57:15 +1000 |
commit | 9b21d78a1d28b946a3bebc24a87cb80b43c5270d (patch) | |
tree | 4e2b42ef606e2226156995ec35cfa4b61f864370 /src/Editor.cxx | |
parent | bd7aa0cf9047940c75da9c9591d46a8dbfa97803 (diff) | |
download | scintilla-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.cxx | 4 |
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 |