forked from SublimeCodeIntel/SublimeCodeIntel
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmargin_paint.patch
More file actions
41 lines (41 loc) · 1.71 KB
/
margin_paint.patch
File metadata and controls
41 lines (41 loc) · 1.71 KB
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
41
Index: src/Editor.cxx
===================================================================
--- src/Editor.cxx (revision 59115)
+++ src/Editor.cxx (working copy)
@@ -1764,8 +1764,10 @@
if (firstSubLine) {
const StyledText stMargin = pdoc->MarginStyledText(lineDoc);
if (stMargin.text && ValidStyledText(vs, vs.marginStyleOffset, stMargin)) {
- surface->FillRectangle(rcMarker,
- vs.styles[stMargin.StyleAt(0)+vs.marginStyleOffset].back.allocated);
+ if (!stMargin.multipleStyles) {
+ surface->FillRectangle(rcMarker,
+ vs.styles[stMargin.StyleAt(0)+vs.marginStyleOffset].back.allocated);
+ }
if (vs.ms[margin].style == SC_MARGIN_RTEXT) {
int width = WidestLineWidth(surface, vs, vs.marginStyleOffset, stMargin);
rcMarker.left = rcMarker.right - width - 3;
Index: src/Editor.cxx
===================================================================
--- src/Editor.cxx (revision 59115)
+++ src/Editor.cxx (working copy)
@@ -1563,8 +1583,8 @@
PRectangle rcSegment = rcText;
rcSegment.left = x;
rcSegment.right = x + width + 1;
- surface->DrawTextNoClip(rcSegment, vs.styles[style].font,
+ surface->DrawTextClipped(rcSegment, vs.styles[style].font,
ascent, st.text + start + i,
static_cast<int>(end - i + 1),
vs.styles[style].fore.allocated,
vs.styles[style].back.allocated);
@@ -1572,8 +1592,8 @@
}
} else {
size_t style = st.style + styleOffset;
- surface->DrawTextNoClip(rcText, vs.styles[style].font,
+ surface->DrawTextClipped(rcText, vs.styles[style].font,
rcText.top + vs.maxAscent, st.text + start,
static_cast<int>(length),
vs.styles[style].fore.allocated,
vs.styles[style].back.allocated);