Fixed Issue #138: "Format patch" in "Show log" dialog doesn't work
[TortoiseGit.git] / ext / scintilla / backgroundcolors.patch
blob5ab6f4248f55300269291d48f5a6fc2784db6ddd
1 Index: include/Scintilla.h
2 ===================================================================
3 --- include/Scintilla.h (revision 14337)
4 +++ include/Scintilla.h (working copy)
5 @@ -753,6 +753,7 @@
6 #define SCN_AUTOCSELECTION 2022
7 #define SCN_INDICATORCLICK 2023
8 #define SCN_INDICATORRELEASE 2024
9 +#define SCN_GETBKCOLOR 2025
10 #define SCN_AUTOCCANCELLED 2025
11 //--Autogenerated -- end of section automatically generated from Scintilla.iface
13 Index: src/Editor.cxx
14 ===================================================================
15 --- src/Editor.cxx (revision 14337)
16 +++ src/Editor.cxx (working copy)
17 @@ -2270,6 +2270,17 @@
21 + SCNotification scn = {0};
22 + scn.nmhdr.code = SCN_GETBKCOLOR;
23 + scn.line = line;
24 + scn.lParam = -1;
25 + NotifyParent(&scn);
26 + if (scn.lParam != -1)
27 + {
28 + background = scn.lParam;
29 + overrideBackground = true;
30 + }
32 bool drawWhitespaceBackground = (vsDraw.viewWhitespace != wsInvisible) &&
33 (!overrideBackground) && (vsDraw.whitespaceBackgroundSet);
35 Index: src/Editor.h
36 ===================================================================
37 --- src/Editor.h (revision 14337)
38 +++ src/Editor.h (working copy)
39 @@ -360,6 +360,7 @@
40 virtual void NotifyFocus(bool focus);
41 virtual int GetCtrlID() { return ctrlID; }
42 virtual void NotifyParent(SCNotification scn) = 0;
43 + virtual void NotifyParent(SCNotification * scn) = 0;
44 virtual void NotifyStyleToNeeded(int endStyleNeeded);
45 void NotifyChar(int ch);
46 void NotifyMove(int position);
47 Index: win32/ScintillaWin.cxx
48 ===================================================================
49 --- win32/ScintillaWin.cxx (revision 14337)
50 +++ win32/ScintillaWin.cxx (working copy)
51 @@ -208,6 +208,7 @@
52 virtual void NotifyFocus(bool focus);
53 virtual int GetCtrlID();
54 virtual void NotifyParent(SCNotification scn);
55 + virtual void NotifyParent(SCNotification * scn);
56 virtual void NotifyDoubleClick(Point pt, bool shift, bool ctrl, bool alt);
57 virtual void Copy();
58 virtual void CopyAllowLine();
59 @@ -1240,6 +1241,13 @@
60 GetCtrlID(), reinterpret_cast<LPARAM>(&scn));
63 +void ScintillaWin::NotifyParent(SCNotification * scn) {
64 + scn->nmhdr.hwndFrom = MainHWND();
65 + scn->nmhdr.idFrom = GetCtrlID();
66 + ::SendMessage(::GetParent(MainHWND()), WM_NOTIFY,
67 + GetCtrlID(), reinterpret_cast<LPARAM>(scn));
70 void ScintillaWin::NotifyDoubleClick(Point pt, bool shift, bool ctrl, bool alt) {
71 //Platform::DebugPrintf("ScintillaWin Double click 0\n");
72 ScintillaBase::NotifyDoubleClick(pt, shift, ctrl, alt);