aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authornyamatongwe <unknown>2011-12-02 23:35:14 +1100
committernyamatongwe <unknown>2011-12-02 23:35:14 +1100
commit3a78443f09189aa649d623b6d600a4b6fb588523 (patch)
tree17ef5c8156e04721cb63d52f6c2b2ed7d15a989c /src
parent47b1be2e5e81496e33ab5515262d164ce869e2d7 (diff)
downloadscintilla-mirror-3a78443f09189aa649d623b6d600a4b6fb588523.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.
Diffstat (limited to 'src')
-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);
}
}