diff options
author | Felipe Morales <hel.sheep@gmail.com> | 2015-01-05 01:03:22 -0300 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2015-02-16 23:24:31 -0500 |
commit | 3ffc5d81c34cfdd535573a50790690c88e4324bb (patch) | |
tree | aa35b1fcb2e89f4f11976edb4e32b315f746e168 /src/nvim/ex_docmd.c | |
parent | 66d94869a0f01902d93597eae4244f9a64db82fc (diff) | |
download | rneovim-3ffc5d81c34cfdd535573a50790690c88e4324bb.tar.gz rneovim-3ffc5d81c34cfdd535573a50790690c88e4324bb.tar.bz2 rneovim-3ffc5d81c34cfdd535573a50790690c88e4324bb.zip |
Add TabClosed event
TabClosed is triggered when a tab page closes.
Diffstat (limited to 'src/nvim/ex_docmd.c')
-rw-r--r-- | src/nvim/ex_docmd.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/nvim/ex_docmd.c b/src/nvim/ex_docmd.c index 189881be34..bf9b5c16d7 100644 --- a/src/nvim/ex_docmd.c +++ b/src/nvim/ex_docmd.c @@ -5328,10 +5328,12 @@ void tabpage_close_other(tabpage_T *tp, int forceit) int done = 0; win_T *wp; int h = tabline_height(); + char_u prev_idx[NUMBUFLEN]; /* Limit to 1000 windows, autocommands may add a window while we close * one. OK, so I'm paranoid... */ while (++done < 1000) { + sprintf((char *)prev_idx, "%i", tabpage_index(tp)); wp = tp->tp_firstwin; ex_win_close(forceit, wp, tp); @@ -5340,6 +5342,7 @@ void tabpage_close_other(tabpage_T *tp, int forceit) if (!valid_tabpage(tp) || tp->tp_firstwin == wp) break; } + apply_autocmds(EVENT_TABCLOSED, prev_idx, prev_idx, FALSE, curbuf); redraw_tabline = TRUE; if (h != tabline_height()) |