aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authornyamatongwe <devnull@localhost>2011-12-02 23:35:14 +1100
committernyamatongwe <devnull@localhost>2011-12-02 23:35:14 +1100
commitfcd320e78b3bc84a9e09a0f165159413ae7b6071 (patch)
tree49aa743a077c4d0592925e7bb4e5f5c229b4e0f6
parentaa574dabf0f7ec336adb86e4ae5e708cae80bc8f (diff)
downloadscintilla-mirror-fcd320e78b3bc84a9e09a0f165159413ae7b6071.tar.gz
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.
-rw-r--r--src/Editor.cxx6
1 files changed, 3 insertions, 3 deletions
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);
}
}