aboutsummaryrefslogtreecommitdiff
path: root/src/scintilla_backports/6138_55368b05bb72.patch
blob: 7d6d45190f80b831e20cda9cadd2752d70017b57 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# HG changeset patch
# User Neil <nyamatongwe@gmail.com>
# Date 1489925352 -39600
# Node ID 55368b05bb72a05862c4ffb6cb01a1ce70f64c0f
# Parent  c3bba4a9193ea55175c309109e5bab8c87f2a0bd
Group non-single-phase drawing before text.

diff -r c3bba4a9193e -r 55368b05bb72 src/EditView.cxx
--- a/src/EditView.cxx	Thu Mar 16 14:05:22 2017 +1100
+++ b/src/EditView.cxx	Sun Mar 19 23:09:12 2017 +1100
@@ -1846,18 +1846,18 @@
 		xStart += static_cast<int>(ll->wrapIndent);
 	}
 
-	if ((phasesDraw != phasesOne) && (phase & drawBack)) {
-		DrawBackground(surface, model, vsDraw, ll, rcLine, lineRange, posLineStart, xStart,
-			subLine, background);
-		DrawFoldDisplayText(surface, model, vsDraw, ll, line, xStart, rcLine, subLine, subLineStart, drawBack);
-		phase = static_cast<DrawPhase>(phase & ~drawBack);
-		DrawEOL(surface, model, vsDraw, ll, rcLine, line, lineRange.end,
-			xStart, subLine, subLineStart, background);
-	}
+	if (phasesDraw != phasesOne) {
+		if (phase & drawBack) {
+			DrawBackground(surface, model, vsDraw, ll, rcLine, lineRange, posLineStart, xStart,
+				subLine, background);
+			DrawFoldDisplayText(surface, model, vsDraw, ll, line, xStart, rcLine, subLine, subLineStart, drawBack);
+			phase = static_cast<DrawPhase>(phase & ~drawBack);	// Remove drawBack to not draw again in DrawFoldDisplayText
+			DrawEOL(surface, model, vsDraw, ll, rcLine, line, lineRange.end,
+				xStart, subLine, subLineStart, background);
+		}
 
-	if (phase & drawIndicatorsBack) {
-		DrawIndicators(surface, model, vsDraw, ll, line, xStart, rcLine, subLine, lineRange.end, true, model.hoverIndicatorPos);
-		if (phasesDraw != phasesOne) {
+		if (phase & drawIndicatorsBack) {
+			DrawIndicators(surface, model, vsDraw, ll, line, xStart, rcLine, subLine, lineRange.end, true, model.hoverIndicatorPos);
 			DrawEdgeLine(surface, vsDraw, ll, rcLine, lineRange, xStart);
 			DrawMarkUnderline(surface, model, vsDraw, line, rcLine);
 		}