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/fileio.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/fileio.c')
-rw-r--r-- | src/nvim/fileio.c | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/src/nvim/fileio.c b/src/nvim/fileio.c index 97daa035f8..ec91949def 100644 --- a/src/nvim/fileio.c +++ b/src/nvim/fileio.c @@ -5102,16 +5102,15 @@ void buf_reload(buf_T *buf, int orig_mode) check_cursor(); update_topline(); keep_filetype = FALSE; - { - win_T *wp; - tabpage_T *tp; - /* Update folds unless they are defined manually. */ - FOR_ALL_TAB_WINDOWS(tp, wp) + /* Update folds unless they are defined manually. */ + FOR_ALL_TAB_WINDOWS(tp, wp) { if (wp->w_buffer == curwin->w_buffer - && !foldmethodIsManual(wp)) + && !foldmethodIsManual(wp)) { foldUpdateAll(wp); + } } + /* If the mode didn't change and 'readonly' was set, keep the old * value; the user probably used the ":view" command. But don't * reset it, might have had a read error. */ @@ -6269,14 +6268,11 @@ aucmd_restbuf ( * page. Do not trigger autocommands here. */ block_autocmds(); if (curwin != aucmd_win) { - tabpage_T *tp; - win_T *wp; - - FOR_ALL_TAB_WINDOWS(tp, wp) - { + FOR_ALL_TAB_WINDOWS(tp, wp) { if (wp == aucmd_win) { - if (tp != curtab) + if (tp != curtab) { goto_tabpage_tp(tp, TRUE, TRUE); + } win_goto(aucmd_win); goto win_found; } |