Synced backgroundcolors.patch with TortoiseSVN revision #24143
[TortoiseGit.git] / ext / scintilla / backgroundcolors.patch
blob57a46a07e85db1fda81dbf8495ef525d530b9996
1 Index: include/Scintilla.h
2 ===================================================================
3 --- include/Scintilla.h (revision 24106)
4 +++ include/Scintilla.h (working copy)
5 @@ -983,6 +983,8 @@
6 #define SCI_DISTANCETOSECONDARYSTYLES 4025
7 #define SCI_GETSUBSTYLEBASES 4026
8 #endif
10 +#define SCN_GETBKCOLOR 5000
11 /* --Autogenerated -- end of section automatically generated from Scintilla.iface */
13 /* These structures are defined to be exactly the same shape as the Win32
14 Index: src/Editor.cxx
15 ===================================================================
16 --- src/Editor.cxx (revision 24106)
17 +++ src/Editor.cxx (working copy)
18 @@ -2870,6 +2870,17 @@
22 + SCNotification scn = {0};
23 + scn.nmhdr.code = SCN_GETBKCOLOR;
24 + scn.line = line;
25 + scn.lParam = -1;
26 + NotifyParent(&scn);
27 + if (scn.lParam != -1)
28 + {
29 + background = scn.lParam;
30 + overrideBackground = true;
31 + }
33 bool drawWhitespaceBackground = (vsDraw.viewWhitespace != wsInvisible) &&
34 (!overrideBackground) && (vsDraw.whitespaceBackgroundSet);
36 Index: src/Editor.h
37 ===================================================================
38 --- src/Editor.h (revision 24106)
39 +++ src/Editor.h (working copy)
40 @@ -469,6 +469,7 @@
41 virtual void SetCtrlID(int identifier);
42 virtual int GetCtrlID() { return ctrlID; }
43 virtual void NotifyParent(SCNotification scn) = 0;
44 + virtual void NotifyParent(SCNotification * scn) = 0;
45 virtual void NotifyStyleToNeeded(int endStyleNeeded);
46 void NotifyChar(int ch);
47 void NotifySavePoint(bool isSavePoint);
48 Index: win32/ScintillaWin.cxx
49 ===================================================================
50 --- win32/ScintillaWin.cxx (revision 24106)
51 +++ win32/ScintillaWin.cxx (working copy)
52 @@ -252,6 +252,7 @@
53 virtual void SetCtrlID(int identifier);
54 virtual int GetCtrlID();
55 virtual void NotifyParent(SCNotification scn);
56 + virtual void NotifyParent(SCNotification * scn);
57 virtual void NotifyDoubleClick(Point pt, bool shift, bool ctrl, bool alt);
58 virtual CaseFolder *CaseFolderForEncoding();
59 virtual std::string CaseMapString(const std::string &s, int caseMapping);
60 @@ -1426,6 +1427,13 @@
61 GetCtrlID(), reinterpret_cast<LPARAM>(&scn));
64 +void ScintillaWin::NotifyParent(SCNotification * scn) {
65 + scn->nmhdr.hwndFrom = MainHWND();
66 + scn->nmhdr.idFrom = GetCtrlID();
67 + ::SendMessage(::GetParent(MainHWND()), WM_NOTIFY,
68 + GetCtrlID(), reinterpret_cast<LPARAM>(scn));
71 void ScintillaWin::NotifyDoubleClick(Point pt, bool shift, bool ctrl, bool alt) {
72 //Platform::DebugPrintf("ScintillaWin Double click 0\n");
73 ScintillaBase::NotifyDoubleClick(pt, shift, ctrl, alt);