• R/O
  • SSH
  • HTTPS

tortoisesvn: Commit


Commit MetaInfo

Revision28218 (tree)
Time2018-05-12 21:19:29
Authorstefankueng

Log Message

Apply the background colors patch

Change Summary

Incremental Difference

--- trunk/ext/scintilla/backgroundcolors.patch (revision 28217)
+++ trunk/ext/scintilla/backgroundcolors.patch (revision 28218)
@@ -1,8 +1,8 @@
11 Index: include/Scintilla.h
22 ===================================================================
3---- include/Scintilla.h (revision 28115)
3+--- include/Scintilla.h (revision 28217)
44 +++ include/Scintilla.h (working copy)
5-@@ -1114,6 +1114,8 @@
5+@@ -1112,6 +1112,8 @@
66 #endif
77 /* --Autogenerated -- end of section automatically generated from Scintilla.iface */
88
@@ -13,9 +13,9 @@
1313 * So older code that treats Scintilla as a RichEdit will work. */
1414 Index: src/Editor.cxx
1515 ===================================================================
16---- src/Editor.cxx (revision 28115)
16+--- src/Editor.cxx (revision 28217)
1717 +++ src/Editor.cxx (working copy)
18-@@ -103,6 +103,7 @@
18+@@ -104,6 +104,7 @@
1919 }
2020
2121 Editor::Editor() {
@@ -25,9 +25,9 @@
2525 stylesValid = false;
2626 Index: src/Editor.h
2727 ===================================================================
28---- src/Editor.h (revision 28115)
28+--- src/Editor.h (revision 28217)
2929 +++ src/Editor.h (working copy)
30-@@ -571,6 +571,7 @@
30+@@ -594,6 +594,7 @@
3131 static sptr_t BytesResult(sptr_t lParam, const unsigned char *val, size_t len);
3232
3333 public:
@@ -37,25 +37,25 @@
3737 // Public so scintilla_send_message can use it.
3838 Index: src/EditView.cxx
3939 ===================================================================
40---- src/EditView.cxx (revision 28115)
40+--- src/EditView.cxx (revision 28217)
4141 +++ src/EditView.cxx (working copy)
42-@@ -53,6 +53,7 @@
43- #include "EditModel.h"
42+@@ -56,6 +56,7 @@
4443 #include "MarginView.h"
4544 #include "EditView.h"
45+ #include "ElapsedPeriod.h"
4646 +#include "Editor.h"
4747
4848 using namespace Scintilla;
4949
50-@@ -186,6 +187,7 @@
50+@@ -189,6 +190,7 @@
5151 tabArrowHeight = 4;
52- customDrawTabArrow = NULL;
53- customDrawWrapMarker = NULL;
52+ customDrawTabArrow = nullptr;
53+ customDrawWrapMarker = nullptr;
5454 + editor = NULL;
5555 }
5656
5757 EditView::~EditView() {
58-@@ -1873,7 +1875,18 @@
58+@@ -1879,7 +1881,18 @@
5959 }
6060
6161 // See if something overrides the line background color.
@@ -73,13 +73,13 @@
7373 + background.isSet = true;
7474 + }
7575
76- const Sci::Position posLineStart = static_cast<Sci::Position>(model.pdoc->LineStart(line));
76+ const Sci::Position posLineStart = model.pdoc->LineStart(line);
7777
7878 Index: src/EditView.h
7979 ===================================================================
80---- src/EditView.h (revision 28115)
80+--- src/EditView.h (revision 28217)
8181 +++ src/EditView.h (working copy)
82-@@ -75,6 +75,7 @@
82+@@ -77,6 +77,7 @@
8383 std::unique_ptr<Surface> pixmapLine;
8484 std::unique_ptr<Surface> pixmapIndentGuide;
8585 std::unique_ptr<Surface> pixmapIndentGuideHighlight;
@@ -89,9 +89,9 @@
8989 PositionCache posCache;
9090 Index: win32/ScintillaWin.cxx
9191 ===================================================================
92---- win32/ScintillaWin.cxx (revision 28115)
92+--- win32/ScintillaWin.cxx (revision 28217)
9393 +++ win32/ScintillaWin.cxx (working copy)
94-@@ -345,6 +345,7 @@
94+@@ -358,6 +358,7 @@
9595 void SetCtrlID(int identifier) override;
9696 int GetCtrlID() override;
9797 void NotifyParent(SCNotification scn) override;
@@ -99,7 +99,7 @@
9999 void NotifyDoubleClick(Point pt, int modifiers) override;
100100 CaseFolder *CaseFolderForEncoding() override;
101101 std::string CaseMapString(const std::string &s, int caseMapping) override;
102-@@ -1997,6 +1998,13 @@
102+@@ -2003,6 +2004,13 @@
103103 GetCtrlID(), reinterpret_cast<LPARAM>(&scn));
104104 }
105105
--- trunk/ext/scintilla/win32/ScintillaWin.cxx (revision 28217)
+++ trunk/ext/scintilla/win32/ScintillaWin.cxx (revision 28218)
@@ -358,6 +358,7 @@
358358 void SetCtrlID(int identifier) override;
359359 int GetCtrlID() override;
360360 void NotifyParent(SCNotification scn) override;
361+ virtual void NotifyParent(SCNotification * scn);
361362 void NotifyDoubleClick(Point pt, int modifiers) override;
362363 CaseFolder *CaseFolderForEncoding() override;
363364 std::string CaseMapString(const std::string &s, int caseMapping) override;
@@ -2003,6 +2004,13 @@
20032004 GetCtrlID(), reinterpret_cast<LPARAM>(&scn));
20042005 }
20052006
2007+void ScintillaWin::NotifyParent(SCNotification * scn) {
2008+ scn->nmhdr.hwndFrom = MainHWND();
2009+ scn->nmhdr.idFrom = GetCtrlID();
2010+ ::SendMessage(::GetParent(MainHWND()), WM_NOTIFY,
2011+ GetCtrlID(), reinterpret_cast<LPARAM>(scn));
2012+}
2013+
20062014 void ScintillaWin::NotifyDoubleClick(Point pt, int modifiers) {
20072015 //Platform::DebugPrintf("ScintillaWin Double click 0\n");
20082016 ScintillaBase::NotifyDoubleClick(pt, modifiers);
--- trunk/ext/scintilla/include/Scintilla.h (revision 28217)
+++ trunk/ext/scintilla/include/Scintilla.h (revision 28218)
@@ -1112,6 +1112,8 @@
11121112 #endif
11131113 /* --Autogenerated -- end of section automatically generated from Scintilla.iface */
11141114
1115+#define SCN_GETBKCOLOR 5000
1116+
11151117 /* These structures are defined to be exactly the same shape as the Win32
11161118 * CHARRANGE, TEXTRANGE, FINDTEXTEX, FORMATRANGE, and NMHDR structs.
11171119 * So older code that treats Scintilla as a RichEdit will work. */
--- trunk/ext/scintilla/src/Editor.cxx (revision 28217)
+++ trunk/ext/scintilla/src/Editor.cxx (revision 28218)
@@ -104,6 +104,7 @@
104104 }
105105
106106 Editor::Editor() {
107+ view.editor = this;
107108 ctrlID = 0;
108109
109110 stylesValid = false;
--- trunk/ext/scintilla/src/EditView.h (revision 28217)
+++ trunk/ext/scintilla/src/EditView.h (revision 28218)
@@ -77,6 +77,7 @@
7777 std::unique_ptr<Surface> pixmapLine;
7878 std::unique_ptr<Surface> pixmapIndentGuide;
7979 std::unique_ptr<Surface> pixmapIndentGuideHighlight;
80+ void *editor;
8081
8182 LineLayoutCache llc;
8283 PositionCache posCache;
--- trunk/ext/scintilla/src/EditView.cxx (revision 28217)
+++ trunk/ext/scintilla/src/EditView.cxx (revision 28218)
@@ -56,6 +56,7 @@
5656 #include "MarginView.h"
5757 #include "EditView.h"
5858 #include "ElapsedPeriod.h"
59+#include "Editor.h"
5960
6061 using namespace Scintilla;
6162
@@ -189,6 +190,7 @@
189190 tabArrowHeight = 4;
190191 customDrawTabArrow = nullptr;
191192 customDrawWrapMarker = nullptr;
193+ editor = NULL;
192194 }
193195
194196 EditView::~EditView() {
@@ -1879,7 +1881,18 @@
18791881 }
18801882
18811883 // See if something overrides the line background color.
1882- const ColourOptional background = vsDraw.Background(model.pdoc->GetMark(line), model.caret.active, ll->containsCaret);
1884+ ColourOptional background = vsDraw.Background(model.pdoc->GetMark(line), model.caret.active, ll->containsCaret);
1885+ SCNotification scn = { 0 };
1886+ scn.nmhdr.code = SCN_GETBKCOLOR;
1887+ scn.line = line;
1888+ scn.lParam = -1;
1889+ if (editor)
1890+ ((Editor*)editor)->NotifyParent(&scn);
1891+ if (scn.lParam != -1)
1892+ {
1893+ background.Set(scn.lParam);
1894+ background.isSet = true;
1895+ }
18831896
18841897 const Sci::Position posLineStart = model.pdoc->LineStart(line);
18851898
--- trunk/ext/scintilla/src/Editor.h (revision 28217)
+++ trunk/ext/scintilla/src/Editor.h (revision 28218)
@@ -594,6 +594,7 @@
594594 static sptr_t BytesResult(sptr_t lParam, const unsigned char *val, size_t len);
595595
596596 public:
597+ virtual void NotifyParent(SCNotification * scn) = 0;
597598 // Public so the COM thunks can access it.
598599 bool IsUnicodeMode() const;
599600 // Public so scintilla_send_message can use it.
Show on old repository browser