diff options
author | 2016-07-24 15:40:55 -0400 | |
---|---|---|
committer | 2016-07-24 15:40:55 -0400 | |
commit | e9474c8c82745d82ffb39ff1618a96b10f724077 (patch) | |
tree | c4955dbf53e73e050b132da79a9ecd5b3aa55530 /src | |
parent | 74049a11517ffb608bf64aabcc96535d1bc7b298 (diff) | |
download | textadept-e9474c8c82745d82ffb39ff1618a96b10f724077.tar.gz textadept-e9474c8c82745d82ffb39ff1618a96b10f724077.zip |
Added `events.TAB_CLICKED` event.
This allows for the user to override the default switch behavior (e.g. switch to
an existing split view that already has the target buffer open).
Thanks to Gabriel Dubatti.
Diffstat (limited to 'src')
-rw-r--r-- | src/textadept.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/textadept.c b/src/textadept.c index a9a044f3..1b5eb203 100644 --- a/src/textadept.c +++ b/src/textadept.c @@ -1846,9 +1846,7 @@ static void w_quit_osx(GtkosxApplication*_, void*__) { */ static void t_tabchange(GtkNotebook*_, GtkWidget*__, int page_num, void*___) { if (tab_sync) return; - lL_event(lua, "buffer_before_switch", -1); - lL_gotodoc(lua, focused_view, page_num + 1, FALSE); - lL_event(lua, "buffer_after_switch", -1); + lL_event(lua, "tab_clicked", LUA_TNUMBER, page_num + 1, -1); } /** |