• R/O
  • SSH
  • HTTPS

tortoisesvn: Commit


Commit MetaInfo

Revision28966 (tree)
Zeit2020-09-16 02:09:57
Autorstefankueng

Log Message

apply the background colors patch.

Ändern Zusammenfassung

Diff

--- trunk/ext/scintilla/backgroundcolors.patch (revision 28965)
+++ trunk/ext/scintilla/backgroundcolors.patch (revision 28966)
@@ -1,8 +1,8 @@
11 Index: include/Scintilla.h
22 ===================================================================
3---- include/Scintilla.h (revision 28958)
3+--- include/Scintilla.h (revision 28965)
44 +++ include/Scintilla.h (working copy)
5-@@ -1172,6 +1172,8 @@
5+@@ -1173,6 +1173,8 @@
66
77 #endif
88
@@ -13,7 +13,7 @@
1313 * So older code that treats Scintilla as a RichEdit will work. */
1414 Index: src/Editor.cxx
1515 ===================================================================
16---- src/Editor.cxx (revision 28958)
16+--- src/Editor.cxx (revision 28965)
1717 +++ src/Editor.cxx (working copy)
1818 @@ -110,6 +110,7 @@
1919 }
@@ -25,7 +25,7 @@
2525 stylesValid = false;
2626 Index: src/Editor.h
2727 ===================================================================
28---- src/Editor.h (revision 28958)
28+--- src/Editor.h (revision 28965)
2929 +++ src/Editor.h (working copy)
3030 @@ -623,6 +623,7 @@
3131 public:
@@ -37,7 +37,7 @@
3737 // Public so scintilla_send_message can use it.
3838 Index: src/EditView.cxx
3939 ===================================================================
40---- src/EditView.cxx (revision 28958)
40+--- src/EditView.cxx (revision 28965)
4141 +++ src/EditView.cxx (working copy)
4242 @@ -56,6 +56,7 @@
4343 #include "MarginView.h"
@@ -76,7 +76,7 @@
7676
7777 Index: src/EditView.h
7878 ===================================================================
79---- src/EditView.h (revision 28958)
79+--- src/EditView.h (revision 28965)
8080 +++ src/EditView.h (working copy)
8181 @@ -77,6 +77,7 @@
8282 std::unique_ptr<Surface> pixmapLine;
@@ -88,7 +88,7 @@
8888 PositionCache posCache;
8989 Index: win32/ScintillaWin.cxx
9090 ===================================================================
91---- win32/ScintillaWin.cxx (revision 28958)
91+--- win32/ScintillaWin.cxx (revision 28965)
9292 +++ win32/ScintillaWin.cxx (working copy)
9393 @@ -424,6 +424,7 @@
9494 void SetCtrlID(int identifier) 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-@@ -2279,6 +2280,13 @@
101+@@ -2284,6 +2285,13 @@
102102 GetCtrlID(), reinterpret_cast<LPARAM>(&scn));
103103 }
104104
--- trunk/ext/scintilla/include/Scintilla.h (revision 28965)
+++ trunk/ext/scintilla/include/Scintilla.h (revision 28966)
@@ -1173,6 +1173,8 @@
11731173
11741174 #endif
11751175
1176+#define SCN_GETBKCOLOR 5000
1177+
11761178 /* These structures are defined to be exactly the same shape as the Win32
11771179 * CHARRANGE, TEXTRANGE, FINDTEXTEX, FORMATRANGE, and NMHDR structs.
11781180 * So older code that treats Scintilla as a RichEdit will work. */
--- trunk/ext/scintilla/src/EditView.cxx (revision 28965)
+++ trunk/ext/scintilla/src/EditView.cxx (revision 28966)
@@ -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
@@ -181,6 +182,7 @@
181182 tabArrowHeight = 4;
182183 customDrawTabArrow = nullptr;
183184 customDrawWrapMarker = nullptr;
185+ editor = NULL;
184186 }
185187
186188 EditView::~EditView() {
@@ -2108,7 +2110,17 @@
21082110 }
21092111
21102112 // See if something overrides the line background colour.
2111- const ColourOptional background = vsDraw.Background(model.pdoc->GetMark(line), model.caret.active, ll->containsCaret);
2113+ ColourOptional background = vsDraw.Background(model.pdoc->GetMark(line), model.caret.active, ll->containsCaret);
2114+ SCNotification scn = { 0 };
2115+ scn.nmhdr.code = SCN_GETBKCOLOR;
2116+ scn.line = line;
2117+ scn.lParam = -1;
2118+ if (editor)
2119+ ((Editor*)editor)->NotifyParent(&scn);
2120+ if (scn.lParam != -1)
2121+ {
2122+ background = ColourOptional(true, scn.lParam);
2123+ }
21122124
21132125 const Sci::Position posLineStart = model.pdoc->LineStart(line);
21142126
--- trunk/ext/scintilla/src/EditView.h (revision 28965)
+++ trunk/ext/scintilla/src/EditView.h (revision 28966)
@@ -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 28965)
+++ trunk/ext/scintilla/src/Editor.cxx (revision 28966)
@@ -110,6 +110,7 @@
110110 }
111111
112112 Editor::Editor() : durationWrapOneLine(0.00001, 0.000001, 0.0001) {
113+ view.editor = this;
113114 ctrlID = 0;
114115
115116 stylesValid = false;
--- trunk/ext/scintilla/src/Editor.h (revision 28965)
+++ trunk/ext/scintilla/src/Editor.h (revision 28966)
@@ -623,6 +623,7 @@
623623 public:
624624 ~Editor() override;
625625
626+ virtual void NotifyParent(SCNotification * scn) = 0;
626627 // Public so the COM thunks can access it.
627628 bool IsUnicodeMode() const noexcept;
628629 // Public so scintilla_send_message can use it.
--- trunk/ext/scintilla/win32/ScintillaWin.cxx (revision 28965)
+++ trunk/ext/scintilla/win32/ScintillaWin.cxx (revision 28966)
@@ -424,6 +424,7 @@
424424 void SetCtrlID(int identifier) override;
425425 int GetCtrlID() override;
426426 void NotifyParent(SCNotification scn) override;
427+ virtual void NotifyParent(SCNotification * scn);
427428 void NotifyDoubleClick(Point pt, int modifiers) override;
428429 CaseFolder *CaseFolderForEncoding() override;
429430 std::string CaseMapString(const std::string &s, int caseMapping) override;
@@ -2284,6 +2285,13 @@
22842285 GetCtrlID(), reinterpret_cast<LPARAM>(&scn));
22852286 }
22862287
2288+void ScintillaWin::NotifyParent(SCNotification * scn) {
2289+ scn->nmhdr.hwndFrom = MainHWND();
2290+ scn->nmhdr.idFrom = GetCtrlID();
2291+ ::SendMessage(::GetParent(MainHWND()), WM_NOTIFY,
2292+ GetCtrlID(), reinterpret_cast<LPARAM>(scn));
2293+}
2294+
22872295 void ScintillaWin::NotifyDoubleClick(Point pt, int modifiers) {
22882296 //Platform::DebugPrintf("ScintillaWin Double click 0\n");
22892297 ScintillaBase::NotifyDoubleClick(pt, modifiers);
Show on old repository browser