From 1098df588c20599cc3b2d66e87630615a321d17b Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Fri, 19 Jun 2009 18:40:56 -0400 Subject: Use before_switch and after_switch events for buffers and views. Moved C code for saving/restoring state when switching buffers to Lua. Also added saving of folding state. --- src/textadept.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/textadept.c') diff --git a/src/textadept.c b/src/textadept.c index 13b54274..cef20859 100644 --- a/src/textadept.c +++ b/src/textadept.c @@ -426,10 +426,11 @@ void set_statusbar_text(const char *text, bool docbar) { * @see s_command */ static void switch_to_view(GtkWidget *editor) { + l_handle_event("view_before_switch"); focused_editor = editor; l_set_view_global(editor); l_set_buffer_global(SCINTILLA(editor)); - l_handle_event("view_switch"); + l_handle_event("view_after_switch"); } /** -- cgit v1.2.3