From 3a78443f09189aa649d623b6d600a4b6fb588523 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Fri, 2 Dec 2011 23:35:14 +1100 Subject: Fix display of margins on GTK+. Were appearing red when scrolling as they were copying from the start of the pixmap instead of where the drawing occurred. Caused by optimized drawing in changeset 3949. Also ensured whitespace fold tails displayed correctly. --- src/Editor.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/Editor.cxx b/src/Editor.cxx index 3d1acd4a1..e3a743931 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -1807,9 +1807,9 @@ void Editor::PaintSelMargin(Surface *surfWindow, PRectangle &rc) { // be displayed until the last of a sequence of whitespace. bool needWhiteClosure = false; if (vs.ms[margin].mask & SC_MASK_FOLDERS) { - int level = pdoc->GetLevel(cs.DocFromDisplay(topLine)); + int level = pdoc->GetLevel(cs.DocFromDisplay(visibleLine)); if (level & SC_FOLDLEVELWHITEFLAG) { - int lineBack = cs.DocFromDisplay(topLine); + int lineBack = cs.DocFromDisplay(visibleLine); int levelPrev = level; while ((lineBack > 0) && (levelPrev & SC_FOLDLEVELWHITEFLAG)) { lineBack--; @@ -2017,7 +2017,7 @@ void Editor::PaintSelMargin(Surface *surfWindow, PRectangle &rc) { surface->FillRectangle(rcBlankMargin, vs.styles[STYLE_DEFAULT].back); if (bufferedDraw) { - surfWindow->Copy(rcMargin, Point(), *pixmapSelMargin); + surfWindow->Copy(rcMargin, Point(rcMargin.left, rcMargin.top), *pixmapSelMargin); } } -- cgit v1.2.3