From e9474c8c82745d82ffb39ff1618a96b10f724077 Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Sun, 24 Jul 2016 15:40:55 -0400 Subject: 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. --- src/textadept.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src') 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); } /** -- cgit v1.2.3