aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/scintilla.patch
blob: cc05eb03d7078302173ac522c671d6f38e42ed3b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
diff -r e074c39456a7 gtk/ScintillaGTK.cxx
--- a/gtk/ScintillaGTK.cxx	Mon Jul 15 19:12:27 2013 +1000
+++ b/gtk/ScintillaGTK.cxx	Tue Oct 29 14:22:21 2013 -0400
@@ -1778,7 +1778,8 @@
 			ButtonDown(pt, event->time,
 			        (event->state & GDK_SHIFT_MASK) != 0,
 			        (event->state & GDK_CONTROL_MASK) != 0,
-			        (event->state & modifierTranslated(rectangularSelectionModifier)) != 0);
+			        (event->state & modifierTranslated(rectangularSelectionModifier)) != 0,
+			        (event->state & GDK_META_MASK) != 0);
 		} else if (event->button == 2) {
 			// Grab the primary selection if it exists
 			SelectionPosition pos = SPositionFromLocation(pt, false, false, UserVirtualSpace());
diff -r 1cd0ebd58592 src/Catalogue.cxx
--- a/src/Catalogue.cxx	Mon May 27 10:49:00 2013 +1000
+++ b/src/Catalogue.cxx	Fri Jun 14 08:47:21 2013 -0400
@@ -79,6 +79,7 @@
 // Shorten the code that declares a lexer and ensures it is linked in by calling a method.
 #define LINK_LEXER(lexer) extern LexerModule lexer; Catalogue::AddLexerModule(&lexer);
 
+#if 0
 //++Autogenerated -- run src/LexGen.py to regenerate
 //**\(\tLINK_LEXER(\*);\n\)
 	LINK_LEXER(lmA68k);
@@ -189,6 +190,8 @@
 	LINK_LEXER(lmYAML);
 
 //--Autogenerated -- end of automatically generated section
+#endif
+	LINK_LEXER(lmLPeg);
 
 	return 1;
 }
diff -r e074c39456a7 src/Editor.cxx
--- a/src/Editor.cxx	Mon Jul 15 19:12:27 2013 +1000
+++ b/src/Editor.cxx	Tue Oct 29 14:22:21 2013 -0400
@@ -4464,40 +4464,40 @@
 	NotifyParent(scn);
 }
 
-void Editor::NotifyDoubleClick(Point pt, bool shift, bool ctrl, bool alt) {
+void Editor::NotifyDoubleClick(Point pt, bool shift, bool ctrl, bool alt, bool meta) {
 	SCNotification scn = {0};
 	scn.nmhdr.code = SCN_DOUBLECLICK;
 	scn.line = LineFromLocation(pt);
 	scn.position = PositionFromLocation(pt, true);
 	scn.modifiers = (shift ? SCI_SHIFT : 0) | (ctrl ? SCI_CTRL : 0) |
-	        (alt ? SCI_ALT : 0);
+	        (alt ? SCI_ALT : 0) | (meta ? SCI_META : 0);
 	NotifyParent(scn);
 }
 
-void Editor::NotifyHotSpotDoubleClicked(int position, bool shift, bool ctrl, bool alt) {
+void Editor::NotifyHotSpotDoubleClicked(int position, bool shift, bool ctrl, bool alt, bool meta) {
 	SCNotification scn = {0};
 	scn.nmhdr.code = SCN_HOTSPOTDOUBLECLICK;
 	scn.position = position;
 	scn.modifiers = (shift ? SCI_SHIFT : 0) | (ctrl ? SCI_CTRL : 0) |
-	        (alt ? SCI_ALT : 0);
+	        (alt ? SCI_ALT : 0) | (meta ? SCI_META : 0);
 	NotifyParent(scn);
 }
 
-void Editor::NotifyHotSpotClicked(int position, bool shift, bool ctrl, bool alt) {
+void Editor::NotifyHotSpotClicked(int position, bool shift, bool ctrl, bool alt, bool meta) {
 	SCNotification scn = {0};
 	scn.nmhdr.code = SCN_HOTSPOTCLICK;
 	scn.position = position;
 	scn.modifiers = (shift ? SCI_SHIFT : 0) | (ctrl ? SCI_CTRL : 0) |
-	        (alt ? SCI_ALT : 0);
+	        (alt ? SCI_ALT : 0) | (meta ? SCI_META : 0);
 	NotifyParent(scn);
 }
 
-void Editor::NotifyHotSpotReleaseClick(int position, bool shift, bool ctrl, bool alt) {
+void Editor::NotifyHotSpotReleaseClick(int position, bool shift, bool ctrl, bool alt, bool meta) {
 	SCNotification scn = {0};
 	scn.nmhdr.code = SCN_HOTSPOTRELEASECLICK;
 	scn.position = position;
 	scn.modifiers = (shift ? SCI_SHIFT : 0) | (ctrl ? SCI_CTRL : 0) |
-	        (alt ? SCI_ALT : 0);
+	        (alt ? SCI_ALT : 0) | (meta ? SCI_META : 0);
 	NotifyParent(scn);
 }
 
@@ -4519,19 +4519,19 @@
 	NotifyParent(scn);
 }
 
-void Editor::NotifyIndicatorClick(bool click, int position, bool shift, bool ctrl, bool alt) {
+void Editor::NotifyIndicatorClick(bool click, int position, bool shift, bool ctrl, bool alt, bool meta) {
 	int mask = pdoc->decorations.AllOnFor(position);
 	if ((click && mask) || pdoc->decorations.clickNotified) {
 		SCNotification scn = {0};
 		pdoc->decorations.clickNotified = click;
 		scn.nmhdr.code = click ? SCN_INDICATORCLICK : SCN_INDICATORRELEASE;
-		scn.modifiers = (shift ? SCI_SHIFT : 0) | (ctrl ? SCI_CTRL : 0) | (alt ? SCI_ALT : 0);
+		scn.modifiers = (shift ? SCI_SHIFT : 0) | (ctrl ? SCI_CTRL : 0) | (alt ? SCI_ALT : 0) | (meta ? SCI_META : 0);
 		scn.position = position;
 		NotifyParent(scn);
 	}
 }
 
-bool Editor::NotifyMarginClick(Point pt, bool shift, bool ctrl, bool alt) {
+bool Editor::NotifyMarginClick(Point pt, bool shift, bool ctrl, bool alt, bool meta) {
 	int marginClicked = -1;
 	int x = vs.textStart - vs.fixedColumnWidth;
 	for (int margin = 0; margin <= SC_MAX_MARGIN; margin++) {
@@ -4564,7 +4564,7 @@
 		SCNotification scn = {0};
 		scn.nmhdr.code = SCN_MARGINCLICK;
 		scn.modifiers = (shift ? SCI_SHIFT : 0) | (ctrl ? SCI_CTRL : 0) |
-		        (alt ? SCI_ALT : 0);
+		        (alt ? SCI_ALT : 0) | (meta ? SCI_META : 0);
 		scn.position = position;
 		scn.margin = marginClicked;
 		NotifyParent(scn);
@@ -6285,7 +6285,7 @@
 		|| (rectangular && ((virtualSpaceOptions & SCVS_RECTANGULARSELECTION) != 0));
 }
 
-void Editor::ButtonDown(Point pt, unsigned int curTime, bool shift, bool ctrl, bool alt) {
+void Editor::ButtonDown(Point pt, unsigned int curTime, bool shift, bool ctrl, bool alt, bool meta) {
 	//Platform::DebugPrintf("ButtonDown %d %d = %d alt=%d %d\n", curTime, lastClickTime, curTime - lastClickTime, alt, inDragDrop);
 	ptMouseLast = pt;
 	SelectionPosition newPos = SPositionFromLocation(pt, false, false, AllowVirtualSpace(virtualSpaceOptions, alt));
@@ -6293,10 +6293,10 @@
 	inDragDrop = ddNone;
 	sel.SetMoveExtends(false);
 
-	if (NotifyMarginClick(pt, shift, ctrl, alt))
+	if (NotifyMarginClick(pt, shift, ctrl, alt, meta))
 		return;
 
-	NotifyIndicatorClick(true, newPos.Position(), shift, ctrl, alt);
+	NotifyIndicatorClick(true, newPos.Position(), shift, ctrl, alt, meta);
 
 	bool inSelMargin = PointInSelMargin(pt);
 	// In margin ctrl+(double)click should always select everything
@@ -6379,9 +6379,9 @@
 		}
 		//Platform::DebugPrintf("Double click: %d - %d\n", anchor, currentPos);
 		if (doubleClick) {
-			NotifyDoubleClick(pt, shift, ctrl, alt);
+			NotifyDoubleClick(pt, shift, ctrl, alt, meta);
 			if (PositionIsHotspot(newPos.Position()))
-				NotifyHotSpotDoubleClicked(newPos.Position(), shift, ctrl, alt);
+				NotifyHotSpotDoubleClicked(newPos.Position(), shift, ctrl, alt, meta);
 		}
 	} else {	// Single click
 		if (inSelMargin) {
@@ -6410,7 +6410,7 @@
 			SetMouseCapture(true);
 		} else {
 			if (PointIsHotspot(pt)) {
-				NotifyHotSpotClicked(newPos.Position(), shift, ctrl, alt);
+				NotifyHotSpotClicked(newPos.Position(), shift, ctrl, alt, meta);
 				hotSpotClickPos = PositionFromLocation(pt,true,false);
 			}
 			if (!shift) {
@@ -6628,7 +6628,7 @@
 	}
 	if (hotSpotClickPos != INVALID_POSITION && PointIsHotspot(pt)) {
 		hotSpotClickPos = INVALID_POSITION;
-		NotifyHotSpotReleaseClick(newPos.Position(), false, ctrl, false);
+		NotifyHotSpotReleaseClick(newPos.Position(), false, ctrl, false, false);
 	}
 	if (HaveMouseCapture()) {
 		if (PointInSelMargin(pt)) {
@@ -6639,7 +6639,7 @@
 		}
 		ptMouseLast = pt;
 		SetMouseCapture(false);
-		NotifyIndicatorClick(false, newPos.Position(), false, false, false);
+		NotifyIndicatorClick(false, newPos.Position(), false, false, false, false);
 		if (inDragDrop == ddDragging) {
 			SelectionPosition selStart = SelectionStart();
 			SelectionPosition selEnd = SelectionEnd();
diff -r e074c39456a7 src/Editor.h
--- a/src/Editor.h	Mon Jul 15 19:12:27 2013 +1000
+++ b/src/Editor.h	Tue Oct 29 14:22:21 2013 -0400
@@ -499,14 +499,14 @@
 	void NotifyChar(int ch);
 	void NotifySavePoint(bool isSavePoint);
 	void NotifyModifyAttempt();
-	virtual void NotifyDoubleClick(Point pt, bool shift, bool ctrl, bool alt);
-	void NotifyHotSpotClicked(int position, bool shift, bool ctrl, bool alt);
-	void NotifyHotSpotDoubleClicked(int position, bool shift, bool ctrl, bool alt);
-	void NotifyHotSpotReleaseClick(int position, bool shift, bool ctrl, bool alt);
+	virtual void NotifyDoubleClick(Point pt, bool shift, bool ctrl, bool alt, bool meta=false);
+	void NotifyHotSpotClicked(int position, bool shift, bool ctrl, bool alt, bool meta=false);
+	void NotifyHotSpotDoubleClicked(int position, bool shift, bool ctrl, bool alt, bool meta=false);
+	void NotifyHotSpotReleaseClick(int position, bool shift, bool ctrl, bool alt, bool meta=false);
 	bool NotifyUpdateUI();
 	void NotifyPainted();
-	void NotifyIndicatorClick(bool click, int position, bool shift, bool ctrl, bool alt);
-	bool NotifyMarginClick(Point pt, bool shift, bool ctrl, bool alt);
+	void NotifyIndicatorClick(bool click, int position, bool shift, bool ctrl, bool alt, bool meta=false);
+	bool NotifyMarginClick(Point pt, bool shift, bool ctrl, bool alt, bool meta=false);
 	void NotifyNeedShown(int pos, int len);
 	void NotifyDwelling(Point pt, bool state);
 	void NotifyZoom();
@@ -568,7 +568,7 @@
 	void WordSelection(int pos);
 	void DwellEnd(bool mouseMoved);
 	void MouseLeave();
-	virtual void ButtonDown(Point pt, unsigned int curTime, bool shift, bool ctrl, bool alt);
+	virtual void ButtonDown(Point pt, unsigned int curTime, bool shift, bool ctrl, bool alt, bool meta=false);
 	void ButtonMove(Point pt);
 	void ButtonUp(Point pt, unsigned int curTime, bool ctrl);
 
diff -r e074c39456a7 src/ScintillaBase.cxx
--- a/src/ScintillaBase.cxx	Mon Jul 15 19:12:27 2013 +1000
+++ b/src/ScintillaBase.cxx	Tue Oct 29 14:22:21 2013 -0400
@@ -463,9 +463,9 @@
 	Editor::CancelModes();
 }
 
-void ScintillaBase::ButtonDown(Point pt, unsigned int curTime, bool shift, bool ctrl, bool alt) {
+void ScintillaBase::ButtonDown(Point pt, unsigned int curTime, bool shift, bool ctrl, bool alt, bool meta) {
 	CancelModes();
-	Editor::ButtonDown(pt, curTime, shift, ctrl, alt);
+	Editor::ButtonDown(pt, curTime, shift, ctrl, alt, meta);
 }
 
 #ifdef SCI_LEXER
diff -r e074c39456a7 src/ScintillaBase.h
--- a/src/ScintillaBase.h	Mon Jul 15 19:12:27 2013 +1000
+++ b/src/ScintillaBase.h	Tue Oct 29 14:22:21 2013 -0400
@@ -83,7 +83,7 @@
 	virtual void AddToPopUp(const char *label, int cmd=0, bool enabled=true) = 0;
 	void ContextMenu(Point pt);
 
-	virtual void ButtonDown(Point pt, unsigned int curTime, bool shift, bool ctrl, bool alt);
+	virtual void ButtonDown(Point pt, unsigned int curTime, bool shift, bool ctrl, bool alt, bool meta=false);
 
 	void NotifyStyleToNeeded(int endStyleNeeded);
 	void NotifyLexerChanged(Document *doc, void *userData);