diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/lua_interface.c | 10 | ||||
-rw-r--r-- | src/textadept.c | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/lua_interface.c b/src/lua_interface.c index c3f8d99d..0be9362e 100644 --- a/src/lua_interface.c +++ b/src/lua_interface.c @@ -328,7 +328,7 @@ bool l_call_function(int nargs, int retn=0, bool keep_return=false) { // error message is at stack top void l_handle_error(LS *lua, const char *errmsg) { - if (focused_editor && l_is_ta_table_function("handlers", "error")) { + if (focused_editor && l_is_ta_table_function("events", "error")) { l_insert(lua, -1); // shift error message down if (errmsg) lua_pushstring(lua, errmsg); l_call_function(errmsg ? 2 : 1); @@ -340,11 +340,11 @@ void l_handle_error(LS *lua, const char *errmsg) { } bool l_handle_signal(const char *s) { - return l_is_ta_table_function("handlers", s) ? l_call_function(0, 1) : true; + return l_is_ta_table_function("events", s) ? l_call_function(0, 1) : true; } bool l_handle_keypress(int keyval, GdkEventKey *event) { - if (!l_is_ta_table_function("handlers", "keypress")) return false; + if (!l_is_ta_table_function("events", "keypress")) return false; lua_pushinteger(lua, keyval); lua_pushboolean(lua, (event->state & GDK_SHIFT_MASK) > 0 ? 1 : 0); lua_pushboolean(lua, (event->state & GDK_CONTROL_MASK) > 0 ? 1 : 0); @@ -353,7 +353,7 @@ bool l_handle_keypress(int keyval, GdkEventKey *event) { } void l_handle_completion(const char *command) { - if (!l_is_ta_table_function("handlers", + if (!l_is_ta_table_function("events", command ? "show_completions" : "hide_completions")) return; if (command) lua_pushstring(lua, command); l_call_function(command ? 1 : 0); @@ -363,7 +363,7 @@ void l_handle_completion(const char *command) { #define l_scn_str(s, n) { lua_pushstring(lua, s); lua_setfield(lua, -2, n); } void l_handle_scnnotification(SCNotification *n) { - if (!l_is_ta_table_function("handlers", "notification")) return; + if (!l_is_ta_table_function("events", "notification")) return; lua_newtable(lua); l_scn_int(n->nmhdr.code, "code"); l_scn_int(n->position, "position"); diff --git a/src/textadept.c b/src/textadept.c index 416b83fb..98096123 100644 --- a/src/textadept.c +++ b/src/textadept.c @@ -244,7 +244,7 @@ static bool t_keypress(GtkWidget*, GdkEventKey *event, gpointer) { return l_handle_keypress(event->keyval, event); } -static bool w_keypress(GtkWidget* , GdkEventKey *event, gpointer) { +static bool w_keypress(GtkWidget*, GdkEventKey *event, gpointer) { if (event->keyval == 0xff1b && GTK_WIDGET_VISIBLE(findbox)) { gtk_widget_hide(findbox); gtk_widget_grab_focus(focused_editor); |