• R/O
  • SSH
  • HTTPS

tortoisesvn: Commit


Commit MetaInfo

Revision28562 (tree)
Time2019-04-13 16:10:43
Authorstefankueng

Log Message

apply the backgroundcolors patch

Change Summary

Incremental Difference

--- trunk/ext/scintilla/backgroundcolors.patch (revision 28561)
+++ trunk/ext/scintilla/backgroundcolors.patch (revision 28562)
@@ -1,8 +1,8 @@
11 Index: include/Scintilla.h
22 ===================================================================
3---- include/Scintilla.h (revision 28493)
3+--- include/Scintilla.h (revision 28561)
44 +++ include/Scintilla.h (working copy)
5-@@ -1127,6 +1127,8 @@
5+@@ -1129,6 +1129,8 @@
66 #endif
77 /* --Autogenerated -- end of section automatically generated from Scintilla.iface */
88
@@ -11,11 +11,11 @@
1111 /* These structures are defined to be exactly the same shape as the Win32
1212 * CHARRANGE, TEXTRANGE, FINDTEXTEX, FORMATRANGE, and NMHDR structs.
1313 * So older code that treats Scintilla as a RichEdit will work. */
14-Index: src/Editor.cxx
15-===================================================================
16---- src/Editor.cxx (revision 28493)
17-+++ src/Editor.cxx (working copy)
18-@@ -106,6 +106,7 @@
14+Index: src/Editor.cxx
15+===================================================================
16+--- src/Editor.cxx (revision 28561)
17++++ src/Editor.cxx (working copy)
18+@@ -109,6 +109,7 @@
1919 }
2020
2121 Editor::Editor() : durationWrapOneLine(0.00001, 0.000001, 0.0001) {
@@ -25,21 +25,21 @@
2525 stylesValid = false;
2626 Index: src/Editor.h
2727 ===================================================================
28---- src/Editor.h (revision 28493)
28+--- src/Editor.h (revision 28561)
2929 +++ src/Editor.h (working copy)
3030 @@ -596,6 +596,7 @@
31- static sptr_t BytesResult(sptr_t lParam, const unsigned char *val, size_t len);
31+ static sptr_t BytesResult(sptr_t lParam, const unsigned char *val, size_t len) noexcept;
3232
3333 public:
3434 + virtual void NotifyParent(SCNotification * scn) = 0;
3535 // Public so the COM thunks can access it.
36- bool IsUnicodeMode() const;
36+ bool IsUnicodeMode() const noexcept;
3737 // Public so scintilla_send_message can use it.
3838 Index: src/EditView.cxx
3939 ===================================================================
40---- src/EditView.cxx (revision 28493)
40+--- src/EditView.cxx (revision 28561)
4141 +++ src/EditView.cxx (working copy)
42-@@ -56,6 +56,7 @@
42+@@ -55,6 +55,7 @@
4343 #include "MarginView.h"
4444 #include "EditView.h"
4545 #include "ElapsedPeriod.h"
@@ -47,7 +47,7 @@
4747
4848 using namespace Scintilla;
4949
50-@@ -188,6 +189,7 @@
50+@@ -187,6 +188,7 @@
5151 tabArrowHeight = 4;
5252 customDrawTabArrow = nullptr;
5353 customDrawWrapMarker = nullptr;
@@ -76,7 +76,7 @@
7676
7777 Index: src/EditView.h
7878 ===================================================================
79---- src/EditView.h (revision 28493)
79+--- src/EditView.h (revision 28561)
8080 +++ src/EditView.h (working copy)
8181 @@ -77,6 +77,7 @@
8282 std::unique_ptr<Surface> pixmapLine;
@@ -88,9 +88,9 @@
8888 PositionCache posCache;
8989 Index: win32/ScintillaWin.cxx
9090 ===================================================================
91---- win32/ScintillaWin.cxx (revision 28493)
91+--- win32/ScintillaWin.cxx (revision 28561)
9292 +++ win32/ScintillaWin.cxx (working copy)
93-@@ -358,6 +358,7 @@
93+@@ -357,6 +357,7 @@
9494 void SetCtrlID(int identifier) override;
9595 int GetCtrlID() override;
9696 void NotifyParent(SCNotification scn) override;
@@ -98,7 +98,7 @@
9898 void NotifyDoubleClick(Point pt, int modifiers) override;
9999 CaseFolder *CaseFolderForEncoding() override;
100100 std::string CaseMapString(const std::string &s, int caseMapping) override;
101-@@ -2024,6 +2025,13 @@
101+@@ -2023,6 +2024,13 @@
102102 GetCtrlID(), reinterpret_cast<LPARAM>(&scn));
103103 }
104104
--- trunk/ext/scintilla/include/Scintilla.h (revision 28561)
+++ trunk/ext/scintilla/include/Scintilla.h (revision 28562)
@@ -1129,6 +1129,8 @@
11291129 #endif
11301130 /* --Autogenerated -- end of section automatically generated from Scintilla.iface */
11311131
1132+#define SCN_GETBKCOLOR 5000
1133+
11321134 /* These structures are defined to be exactly the same shape as the Win32
11331135 * CHARRANGE, TEXTRANGE, FINDTEXTEX, FORMATRANGE, and NMHDR structs.
11341136 * So older code that treats Scintilla as a RichEdit will work. */
--- trunk/ext/scintilla/src/EditView.cxx (revision 28561)
+++ trunk/ext/scintilla/src/EditView.cxx (revision 28562)
@@ -55,6 +55,7 @@
5555 #include "MarginView.h"
5656 #include "EditView.h"
5757 #include "ElapsedPeriod.h"
58+#include "Editor.h"
5859
5960 using namespace Scintilla;
6061
@@ -187,6 +188,7 @@
187188 tabArrowHeight = 4;
188189 customDrawTabArrow = nullptr;
189190 customDrawWrapMarker = nullptr;
191+ editor = NULL;
190192 }
191193
192194 EditView::~EditView() {
@@ -2015,7 +2017,17 @@
20152017 }
20162018
20172019 // See if something overrides the line background color.
2018- const ColourOptional background = vsDraw.Background(model.pdoc->GetMark(line), model.caret.active, ll->containsCaret);
2020+ ColourOptional background = vsDraw.Background(model.pdoc->GetMark(line), model.caret.active, ll->containsCaret);
2021+ SCNotification scn = { 0 };
2022+ scn.nmhdr.code = SCN_GETBKCOLOR;
2023+ scn.line = line;
2024+ scn.lParam = -1;
2025+ if (editor)
2026+ ((Editor*)editor)->NotifyParent(&scn);
2027+ if (scn.lParam != -1)
2028+ {
2029+ background = ColourOptional(true, scn.lParam);
2030+ }
20192031
20202032 const Sci::Position posLineStart = model.pdoc->LineStart(line);
20212033
--- trunk/ext/scintilla/src/EditView.h (revision 28561)
+++ trunk/ext/scintilla/src/EditView.h (revision 28562)
@@ -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/Editor.cxx (revision 28561)
+++ trunk/ext/scintilla/src/Editor.cxx (revision 28562)
@@ -109,6 +109,7 @@
109109 }
110110
111111 Editor::Editor() : durationWrapOneLine(0.00001, 0.000001, 0.0001) {
112+ view.editor = this;
112113 ctrlID = 0;
113114
114115 stylesValid = false;
--- trunk/ext/scintilla/src/Editor.h (revision 28561)
+++ trunk/ext/scintilla/src/Editor.h (revision 28562)
@@ -596,6 +596,7 @@
596596 static sptr_t BytesResult(sptr_t lParam, const unsigned char *val, size_t len) noexcept;
597597
598598 public:
599+ virtual void NotifyParent(SCNotification * scn) = 0;
599600 // Public so the COM thunks can access it.
600601 bool IsUnicodeMode() const noexcept;
601602 // Public so scintilla_send_message can use it.
--- trunk/ext/scintilla/win32/ScintillaWin.cxx (revision 28561)
+++ trunk/ext/scintilla/win32/ScintillaWin.cxx (revision 28562)
@@ -357,6 +357,7 @@
357357 void SetCtrlID(int identifier) override;
358358 int GetCtrlID() override;
359359 void NotifyParent(SCNotification scn) override;
360+ virtual void NotifyParent(SCNotification * scn);
360361 void NotifyDoubleClick(Point pt, int modifiers) override;
361362 CaseFolder *CaseFolderForEncoding() override;
362363 std::string CaseMapString(const std::string &s, int caseMapping) override;
@@ -2023,6 +2024,13 @@
20232024 GetCtrlID(), reinterpret_cast<LPARAM>(&scn));
20242025 }
20252026
2027+void ScintillaWin::NotifyParent(SCNotification * scn) {
2028+ scn->nmhdr.hwndFrom = MainHWND();
2029+ scn->nmhdr.idFrom = GetCtrlID();
2030+ ::SendMessage(::GetParent(MainHWND()), WM_NOTIFY,
2031+ GetCtrlID(), reinterpret_cast<LPARAM>(scn));
2032+}
2033+
20262034 void ScintillaWin::NotifyDoubleClick(Point pt, int modifiers) {
20272035 //Platform::DebugPrintf("ScintillaWin Double click 0\n");
20282036 ScintillaBase::NotifyDoubleClick(pt, modifiers);
Show on old repository browser