From 56ed1e9e1c7f02aa7a8110c3b084690822e334c5 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Wed, 27 Apr 2011 12:57:15 +1000 Subject: =?UTF-8?q?Optimize=20fold=20marker=20highlight.=20Feature=20#3282?= =?UTF-8?q?649.=20From=20J=C3=A9r=C3=B4me=20LAFORGE.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Editor.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/Editor.cxx') 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 -- cgit v1.2.3