• R/O
  • SSH
  • HTTPS

tortoisesvn: Commit


Commit MetaInfo

Revisión28829 (tree)
Tiempo2020-03-26 02:53:07
Autorstefankueng

Log Message

apply the background colors patch

Cambiar Resumen

Diferencia

--- trunk/ext/scintilla/backgroundcolors.patch (revision 28828)
+++ trunk/ext/scintilla/backgroundcolors.patch (revision 28829)
@@ -1,8 +1,8 @@
11 Index: include/Scintilla.h
22 ===================================================================
3---- include/Scintilla.h (revision 28635)
3+--- include/Scintilla.h (revision 28828)
44 +++ include/Scintilla.h (working copy)
5-@@ -1143,6 +1143,8 @@
5+@@ -1152,6 +1152,8 @@
66 #endif
77 /* --Autogenerated -- end of section automatically generated from Scintilla.iface */
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 28635)
16+--- src/Editor.cxx (revision 28828)
1717 +++ src/Editor.cxx (working copy)
1818 @@ -110,6 +110,7 @@
1919 }
@@ -25,9 +25,9 @@
2525 stylesValid = false;
2626 Index: src/Editor.h
2727 ===================================================================
28---- src/Editor.h (revision 28635)
28+--- src/Editor.h (revision 28828)
2929 +++ src/Editor.h (working copy)
30-@@ -601,6 +601,7 @@
30+@@ -622,6 +622,7 @@
3131 public:
3232 ~Editor() override;
3333
@@ -37,7 +37,7 @@
3737 // Public so scintilla_send_message can use it.
3838 Index: src/EditView.cxx
3939 ===================================================================
40---- src/EditView.cxx (revision 28635)
40+--- src/EditView.cxx (revision 28828)
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 28635)
79+--- src/EditView.h (revision 28828)
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 28635)
91+--- win32/ScintillaWin.cxx (revision 28828)
9292 +++ win32/ScintillaWin.cxx (working copy)
93-@@ -367,6 +367,7 @@
93+@@ -389,6 +389,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-@@ -2017,6 +2018,13 @@
101+@@ -2220,6 +2221,13 @@
102102 GetCtrlID(), reinterpret_cast<LPARAM>(&scn));
103103 }
104104
--- trunk/ext/scintilla/include/Scintilla.h (revision 28828)
+++ trunk/ext/scintilla/include/Scintilla.h (revision 28829)
@@ -1152,6 +1152,8 @@
11521152 #endif
11531153 /* --Autogenerated -- end of section automatically generated from Scintilla.iface */
11541154
1155+#define SCN_GETBKCOLOR 5000
1156+
11551157 /* These structures are defined to be exactly the same shape as the Win32
11561158 * CHARRANGE, TEXTRANGE, FINDTEXTEX, FORMATRANGE, and NMHDR structs.
11571159 * So older code that treats Scintilla as a RichEdit will work. */
--- trunk/ext/scintilla/src/EditView.cxx (revision 28828)
+++ trunk/ext/scintilla/src/EditView.cxx (revision 28829)
@@ -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() {
@@ -2020,7 +2022,17 @@
20202022 }
20212023
20222024 // See if something overrides the line background colour.
2023- const ColourOptional background = vsDraw.Background(model.pdoc->GetMark(line), model.caret.active, ll->containsCaret);
2025+ ColourOptional background = vsDraw.Background(model.pdoc->GetMark(line), model.caret.active, ll->containsCaret);
2026+ SCNotification scn = { 0 };
2027+ scn.nmhdr.code = SCN_GETBKCOLOR;
2028+ scn.line = line;
2029+ scn.lParam = -1;
2030+ if (editor)
2031+ ((Editor*)editor)->NotifyParent(&scn);
2032+ if (scn.lParam != -1)
2033+ {
2034+ background = ColourOptional(true, scn.lParam);
2035+ }
20242036
20252037 const Sci::Position posLineStart = model.pdoc->LineStart(line);
20262038
--- trunk/ext/scintilla/src/EditView.h (revision 28828)
+++ trunk/ext/scintilla/src/EditView.h (revision 28829)
@@ -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 28828)
+++ trunk/ext/scintilla/src/Editor.cxx (revision 28829)
@@ -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 28828)
+++ trunk/ext/scintilla/src/Editor.h (revision 28829)
@@ -622,6 +622,7 @@
622622 public:
623623 ~Editor() override;
624624
625+ virtual void NotifyParent(SCNotification * scn) = 0;
625626 // Public so the COM thunks can access it.
626627 bool IsUnicodeMode() const noexcept;
627628 // Public so scintilla_send_message can use it.
--- trunk/ext/scintilla/win32/ScintillaWin.cxx (revision 28828)
+++ trunk/ext/scintilla/win32/ScintillaWin.cxx (revision 28829)
@@ -389,6 +389,7 @@
389389 void SetCtrlID(int identifier) override;
390390 int GetCtrlID() override;
391391 void NotifyParent(SCNotification scn) override;
392+ virtual void NotifyParent(SCNotification * scn);
392393 void NotifyDoubleClick(Point pt, int modifiers) override;
393394 CaseFolder *CaseFolderForEncoding() override;
394395 std::string CaseMapString(const std::string &s, int caseMapping) override;
@@ -2220,6 +2221,13 @@
22202221 GetCtrlID(), reinterpret_cast<LPARAM>(&scn));
22212222 }
22222223
2224+void ScintillaWin::NotifyParent(SCNotification * scn) {
2225+ scn->nmhdr.hwndFrom = MainHWND();
2226+ scn->nmhdr.idFrom = GetCtrlID();
2227+ ::SendMessage(::GetParent(MainHWND()), WM_NOTIFY,
2228+ GetCtrlID(), reinterpret_cast<LPARAM>(scn));
2229+}
2230+
22232231 void ScintillaWin::NotifyDoubleClick(Point pt, int modifiers) {
22242232 //Platform::DebugPrintf("ScintillaWin Double click 0\n");
22252233 ScintillaBase::NotifyDoubleClick(pt, modifiers);
Show on old repository browser