diff options
author | Wayne Rowcliffe <war1025@gmail.com> | 2014-08-23 12:03:14 -0500 |
---|---|---|
committer | Wayne Rowcliffe <war1025@gmail.com> | 2014-09-22 09:31:09 -0500 |
commit | 683bc797a0d427d818f69dd4772e149cf94e6b12 (patch) | |
tree | 8bc73873f033b5a37696168c0ddc165869822770 /src/nvim/main.c | |
parent | b4ec6c1a4bacd6eaef958e242310ffaee94805dd (diff) | |
download | rneovim-683bc797a0d427d818f69dd4772e149cf94e6b12.tar.gz rneovim-683bc797a0d427d818f69dd4772e149cf94e6b12.tar.bz2 rneovim-683bc797a0d427d818f69dd4772e149cf94e6b12.zip |
FOR_ALL_WINDOWS_IN_TAB and local variables in FOR_ALL_TAB_WINDOWS
Diffstat (limited to 'src/nvim/main.c')
-rw-r--r-- | src/nvim/main.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/nvim/main.c b/src/nvim/main.c index 7dc299e73b..e3f1d88dff 100644 --- a/src/nvim/main.c +++ b/src/nvim/main.c @@ -758,7 +758,6 @@ main_loop ( /* Exit properly */ void getout(int exitval) { - win_T *wp; tabpage_T *tp, *next_tp; exiting = TRUE; @@ -780,11 +779,12 @@ void getout(int exitval) /* Trigger BufWinLeave for all windows, but only once per buffer. */ for (tp = first_tabpage; tp != NULL; tp = next_tp) { next_tp = tp->tp_next; - for (wp = (tp == curtab) - ? firstwin : tp->tp_firstwin; wp != NULL; wp = wp->w_next) { - if (wp->w_buffer == NULL) + FOR_ALL_WINDOWS_IN_TAB(wp, tp) { + if (wp->w_buffer == NULL) { /* Autocmd must have close the buffer already, skip. */ continue; + } + buf_T *buf = wp->w_buffer; if (buf->b_changedtick != -1) { apply_autocmds(EVENT_BUFWINLEAVE, buf->b_fname, |