diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2015-02-16 23:24:31 -0500 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2015-02-16 23:24:31 -0500 |
commit | 662b7227b54d18c0113741edff157cd8648c2594 (patch) | |
tree | aa35b1fcb2e89f4f11976edb4e32b315f746e168 /src/nvim/ex_docmd.c | |
parent | 0429857689ba98356bc80d01ebd540fe861e8db2 (diff) | |
parent | 3ffc5d81c34cfdd535573a50790690c88e4324bb (diff) | |
download | rneovim-662b7227b54d18c0113741edff157cd8648c2594.tar.gz rneovim-662b7227b54d18c0113741edff157cd8648c2594.tar.bz2 rneovim-662b7227b54d18c0113741edff157cd8648c2594.zip |
Merge #1717 'TabNew, TabNewEntered, TabClosed'
Diffstat (limited to 'src/nvim/ex_docmd.c')
-rw-r--r-- | src/nvim/ex_docmd.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/nvim/ex_docmd.c b/src/nvim/ex_docmd.c index 7ff69a3d41..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()) @@ -5715,7 +5718,9 @@ void ex_splitview(exarg_T *eap) if (win_new_tabpage(cmdmod.tab != 0 ? cmdmod.tab : eap->addr_count == 0 ? 0 : (int)eap->line2 + 1) != FAIL) { + apply_autocmds(EVENT_TABNEW, eap->arg, eap->arg, FALSE, curbuf); do_exedit(eap, old_curwin); + apply_autocmds(EVENT_TABNEWENTERED, NULL, NULL, FALSE, curbuf); /* set the alternate buffer for the window we came from */ if (curwin != old_curwin |