• R/O
  • SSH
  • HTTPS

tortoisesvn: Commit


Commit MetaInfo

Revision28494 (tree)
Time2019-01-11 03:04:58
Authorstefankueng

Log Message

apply the backgroundcolors patch

Change Summary

Incremental Difference

--- trunk/ext/scintilla/backgroundcolors.patch (revision 28493)
+++ trunk/ext/scintilla/backgroundcolors.patch (revision 28494)
@@ -1,8 +1,8 @@
11 Index: include/Scintilla.h
22 ===================================================================
3---- include/Scintilla.h (revision 28410)
3+--- include/Scintilla.h (revision 28493)
44 +++ include/Scintilla.h (working copy)
5-@@ -1125,6 +1125,8 @@
5+@@ -1127,6 +1127,8 @@
66 #endif
77 /* --Autogenerated -- end of section automatically generated from Scintilla.iface */
88
@@ -11,23 +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 28410)
17-+++ src/Editor.cxx (working copy)
18-@@ -104,6 +104,7 @@
19- }
20-
21- Editor::Editor() {
22-+ view.editor = this;
23- ctrlID = 0;
24-
25- stylesValid = false;
2614 Index: src/Editor.h
2715 ===================================================================
28---- src/Editor.h (revision 28410)
16+--- src/Editor.h (revision 28493)
2917 +++ src/Editor.h (working copy)
30-@@ -594,6 +594,7 @@
18+@@ -596,6 +596,7 @@
3119 static sptr_t BytesResult(sptr_t lParam, const unsigned char *val, size_t len);
3220
3321 public:
@@ -37,7 +25,7 @@
3725 // Public so scintilla_send_message can use it.
3826 Index: src/EditView.cxx
3927 ===================================================================
40---- src/EditView.cxx (revision 28410)
28+--- src/EditView.cxx (revision 28493)
4129 +++ src/EditView.cxx (working copy)
4230 @@ -56,6 +56,7 @@
4331 #include "MarginView.h"
@@ -76,7 +64,7 @@
7664
7765 Index: src/EditView.h
7866 ===================================================================
79---- src/EditView.h (revision 28410)
67+--- src/EditView.h (revision 28493)
8068 +++ src/EditView.h (working copy)
8169 @@ -77,6 +77,7 @@
8270 std::unique_ptr<Surface> pixmapLine;
@@ -88,7 +76,7 @@
8876 PositionCache posCache;
8977 Index: win32/ScintillaWin.cxx
9078 ===================================================================
91---- win32/ScintillaWin.cxx (revision 28410)
79+--- win32/ScintillaWin.cxx (revision 28493)
9280 +++ win32/ScintillaWin.cxx (working copy)
9381 @@ -358,6 +358,7 @@
9482 void SetCtrlID(int identifier) override;
@@ -98,7 +86,7 @@
9886 void NotifyDoubleClick(Point pt, int modifiers) override;
9987 CaseFolder *CaseFolderForEncoding() override;
10088 std::string CaseMapString(const std::string &s, int caseMapping) override;
101-@@ -2022,6 +2023,13 @@
89+@@ -2024,6 +2025,13 @@
10290 GetCtrlID(), reinterpret_cast<LPARAM>(&scn));
10391 }
10492
--- trunk/ext/scintilla/include/Scintilla.h (revision 28493)
+++ trunk/ext/scintilla/include/Scintilla.h (revision 28494)
@@ -1127,6 +1127,8 @@
11271127 #endif
11281128 /* --Autogenerated -- end of section automatically generated from Scintilla.iface */
11291129
1130+#define SCN_GETBKCOLOR 5000
1131+
11301132 /* These structures are defined to be exactly the same shape as the Win32
11311133 * CHARRANGE, TEXTRANGE, FINDTEXTEX, FORMATRANGE, and NMHDR structs.
11321134 * So older code that treats Scintilla as a RichEdit will work. */
--- trunk/ext/scintilla/src/EditView.cxx (revision 28493)
+++ trunk/ext/scintilla/src/EditView.cxx (revision 28494)
@@ -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
@@ -188,6 +189,7 @@
188189 tabArrowHeight = 4;
189190 customDrawTabArrow = nullptr;
190191 customDrawWrapMarker = nullptr;
192+ editor = NULL;
191193 }
192194
193195 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 28493)
+++ trunk/ext/scintilla/src/EditView.h (revision 28494)
@@ -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.h (revision 28493)
+++ trunk/ext/scintilla/src/Editor.h (revision 28494)
@@ -596,6 +596,7 @@
596596 static sptr_t BytesResult(sptr_t lParam, const unsigned char *val, size_t len);
597597
598598 public:
599+ virtual void NotifyParent(SCNotification * scn) = 0;
599600 // Public so the COM thunks can access it.
600601 bool IsUnicodeMode() const;
601602 // Public so scintilla_send_message can use it.
--- trunk/ext/scintilla/win32/ScintillaWin.cxx (revision 28493)
+++ trunk/ext/scintilla/win32/ScintillaWin.cxx (revision 28494)
@@ -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;
@@ -2024,6 +2025,13 @@
20242025 GetCtrlID(), reinterpret_cast<LPARAM>(&scn));
20252026 }
20262027
2028+void ScintillaWin::NotifyParent(SCNotification * scn) {
2029+ scn->nmhdr.hwndFrom = MainHWND();
2030+ scn->nmhdr.idFrom = GetCtrlID();
2031+ ::SendMessage(::GetParent(MainHWND()), WM_NOTIFY,
2032+ GetCtrlID(), reinterpret_cast<LPARAM>(scn));
2033+}
2034+
20272035 void ScintillaWin::NotifyDoubleClick(Point pt, int modifiers) {
20282036 //Platform::DebugPrintf("ScintillaWin Double click 0\n");
20292037 ScintillaBase::NotifyDoubleClick(pt, modifiers);
Show on old repository browser