[code] [textadept] Tab click event

From: Gabriel Dubatti <gdubatti.att.gmail.com>
Date: Sat, 23 Jul 2016 16:16:42 -0300

Hi Mitchell,

     I just wondered if you can add a "tab_clicked" event that allows
us, if we want, to change the view 'before' the buffer is changed.
     I find this more natural (more IDE like) than the actual behavior,
specially when split views show search results or compiler output.

     It only requires to add 1 line to textadept.lua at line 1828 (the 3
following lines could me moved to lua code):

static void t_tabchange(GtkNotebook*_, GtkWidget*__, int page_num,
void*___) {
   if (tab_sync) return;

   lL_event(lua, "tab_clicked", LUA_TNUMBER, page_num + 1, -1); /* ---
add this line --- */

   /* ----- the following 3 lines could be moved to lua code ---- */
   lL_event(lua, "buffer_before_switch", -1);
   lL_gotodoc(lua, focused_view, page_num + 1, FALSE);
   lL_event(lua, "buffer_after_switch", -1);
}

     I add this line by hand every time I update textadept and compiled
it in Ubuntu without any problem (couldn't compile it in Windows yet).
     It would be great if you can add this to version 9 (hope is not to
late).

     Best wishes,
     Gabriel

-- 
You are subscribed to code.att.foicica.com.
To change subscription settings, send an e-mail to code+help.att.foicica.com.
To unsubscribe, send an e-mail to code+unsubscribe.att.foicica.com.
Received on Sat 23 Jul 2016 - 15:16:42 EDT

This archive was generated by hypermail 2.2.0 : Sun 24 Jul 2016 - 06:42:50 EDT