updated Scintilla to 2.29
[TortoiseGit.git] / ext / scintilla / backgroundcolors.patch
blob04b7419c16e1b5b4cb27318a9f971001e988d369
1 Index: include/Scintilla.h
2 ===================================================================
3 --- include/Scintilla.h (Revision 21909)
4 +++ include/Scintilla.h (Arbeitskopie)
5 @@ -923,6 +923,9 @@
6 #define SCN_AUTOCCANCELLED 2025
7 #define SCN_AUTOCCHARDELETED 2026
8 #define SCN_HOTSPOTRELEASECLICK 2027
10 +#define SCN_GETBKCOLOR 3000
12 /* --Autogenerated -- end of section automatically generated from Scintilla.iface */
14 /* These structures are defined to be exactly the same shape as the Win32
15 Index: src/Editor.cxx
16 ===================================================================
17 --- src/Editor.cxx (Revision 21909)
18 +++ src/Editor.cxx (Arbeitskopie)
19 @@ -2804,6 +2804,17 @@
23 + SCNotification scn = {0};
24 + scn.nmhdr.code = SCN_GETBKCOLOR;
25 + scn.line = line;
26 + scn.lParam = -1;
27 + NotifyParent(&scn);
28 + if (scn.lParam != -1)
29 + {
30 + background = scn.lParam;
31 + overrideBackground = true;
32 + }
34 bool drawWhitespaceBackground = (vsDraw.viewWhitespace != wsInvisible) &&
35 (!overrideBackground) && (vsDraw.whitespaceBackgroundSet);
37 Index: src/Editor.h
38 ===================================================================
39 --- src/Editor.h (Revision 21909)
40 +++ src/Editor.h (Arbeitskopie)
41 @@ -426,6 +426,7 @@
42 virtual void SetCtrlID(int identifier);
43 virtual int GetCtrlID() { return ctrlID; }
44 virtual void NotifyParent(SCNotification scn) = 0;
45 + virtual void NotifyParent(SCNotification * scn) = 0;
46 virtual void NotifyStyleToNeeded(int endStyleNeeded);
47 void NotifyChar(int ch);
48 void NotifySavePoint(bool isSavePoint);
49 Index: win32/scintilla.mak
50 ===================================================================
51 --- win32/scintilla.mak (Revision 21909)
52 +++ win32/scintilla.mak (Arbeitskopie)
53 @@ -21,7 +21,7 @@
54 RC=rc
55 LD=link
57 -CXXFLAGS=-Zi -TP -W4 -EHsc -Zc:forScope -Zc:wchar_t -D_CRT_SECURE_NO_DEPRECATE=1
58 +CXXFLAGS=-Zi -TP -W0 -EHsc -Zc:forScope -Zc:wchar_t -D_CRT_SECURE_NO_DEPRECATE=1
59 # For something scary:-Wp64
60 CXXDEBUG=-Od -MTd -DDEBUG
61 CXXNDEBUG=-O1 -MT -DNDEBUG -GL
62 Index: win32/ScintillaWin.cxx
63 ===================================================================
64 --- win32/ScintillaWin.cxx (Revision 21909)
65 +++ win32/ScintillaWin.cxx (Arbeitskopie)
66 @@ -238,6 +238,7 @@
67 virtual void SetCtrlID(int identifier);
68 virtual int GetCtrlID();
69 virtual void NotifyParent(SCNotification scn);
70 + virtual void NotifyParent(SCNotification * scn);
71 virtual void NotifyDoubleClick(Point pt, bool shift, bool ctrl, bool alt);
72 virtual CaseFolder *CaseFolderForEncoding();
73 virtual std::string CaseMapString(const std::string &s, int caseMapping);
74 @@ -1318,6 +1319,13 @@
75 GetCtrlID(), reinterpret_cast<LPARAM>(&scn));
78 +void ScintillaWin::NotifyParent(SCNotification * scn) {
79 + scn->nmhdr.hwndFrom = MainHWND();
80 + scn->nmhdr.idFrom = GetCtrlID();
81 + ::SendMessage(::GetParent(MainHWND()), WM_NOTIFY,
82 + GetCtrlID(), reinterpret_cast<LPARAM>(scn));
85 void ScintillaWin::NotifyDoubleClick(Point pt, bool shift, bool ctrl, bool alt) {
86 //Platform::DebugPrintf("ScintillaWin Double click 0\n");
87 ScintillaBase::NotifyDoubleClick(pt, shift, ctrl, alt);