aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar mitchell <70453897+667e-11@users.noreply.github.com>2013-12-15 21:45:36 -0500
committerGravatar mitchell <70453897+667e-11@users.noreply.github.com>2013-12-15 21:45:36 -0500
commita9b15a5c8b6e64f536ab05b0e721b8dc881773f9 (patch)
treefde813f87541ab7a06d992dfd5400ece7b06871a /src
parentd8d194a0c7e55d85e26b72879b8b2ea4ceb21cb9 (diff)
Updated to Scintilla 3.3.7.
Diffstat (limited to 'src')
-rw-r--r--src/Makefile2
-rw-r--r--src/scintilla.patch230
-rw-r--r--src/textadept.c11
3 files changed, 8 insertions, 235 deletions
diff --git a/src/Makefile b/src/Makefile
index e575e9c3..4094121a 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -417,7 +417,7 @@ osx-app: ../textadept ../textadeptjit ../textadept-curses \
# External dependencies.
-scintilla_tgz = scintilla334.tgz?download
+scintilla_tgz = scintilla337.tgz?download
scinterm_zip = scinterm.zip
scintillua_zip = scintillua.zip
lua_tgz = lua-5.2.3.tar.gz
diff --git a/src/scintilla.patch b/src/scintilla.patch
index faa1ae45..3b30a825 100644
--- a/src/scintilla.patch
+++ b/src/scintilla.patch
@@ -1,28 +1,15 @@
-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_MOD2_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 @@
+diff -r 5693714a8b0b src/Catalogue.cxx
+--- a/src/Catalogue.cxx Fri Dec 06 16:19:52 2013 +1100
++++ b/src/Catalogue.cxx Sun Dec 15 21:21:20 2013 -0500
+@@ -74,6 +74,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
+ //++Autogenerated -- run scripts/LexGen.py to regenerate
//**\(\tLINK_LEXER(\*);\n\)
LINK_LEXER(lmA68k);
-@@ -189,6 +190,8 @@
+@@ -187,6 +188,8 @@
LINK_LEXER(lmYAML);
//--Autogenerated -- end of automatically generated section
@@ -31,208 +18,3 @@ diff -r 1cd0ebd58592 src/Catalogue.cxx
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);
diff --git a/src/textadept.c b/src/textadept.c
index 096df7dd..37580742 100644
--- a/src/textadept.c
+++ b/src/textadept.c
@@ -1887,18 +1887,10 @@ static void s_notify(Scintilla *view, int _, void *lParam, void*__) {
Scintilla *prev = focused_view;
// Do not let a split view steal focus.
goto_view(view), lL_notify(lua, n), goto_view(prev);
- }
+ } else if (n->nmhdr.code == SCN_FOCUSIN) goto_view(view);
}
#if GTK
-/**
- * Signal for a Scintilla command.
- * Currently handles SCEN_SETFOCUS.
- */
-static void s_command(GtkWidget *view, int wParam, void*_, void*__) {
- if (wParam >> 16 == SCEN_SETFOCUS) goto_view(view);
-}
-
/** Signal for a Scintilla keypress. */
static int s_keypress(GtkWidget*_, GdkEventKey *event, void*__) {
return lL_event(lua, "keypress", LUA_TNUMBER, event->keyval, LUA_TBOOLEAN,
@@ -2091,7 +2083,6 @@ static Scintilla *new_view(sptr_t doc) {
Scintilla *view = scintilla_new();
gtk_widget_set_size_request(view, 1, 1); // minimum size
signal(view, SCINTILLA_NOTIFY, s_notify);
- signal(view, "command", s_command);
signal(view, "key-press-event", s_keypress);
signal(view, "button-press-event", s_buttonpress);
#elif CURSES