diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2014-09-22 13:38:58 -0400 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2014-09-22 13:38:58 -0400 |
commit | 1c84a0e09093d728408024a6baa9967df596be54 (patch) | |
tree | 3038828072136affc9de36257ac49ba069ede25b /src/nvim/fileio.c | |
parent | a4b9e0df67ae95777f8f7d833e7d4c6b8fc3840c (diff) | |
parent | 22bd722c011b04a5fff3182c370c877d82e0fbe0 (diff) | |
download | rneovim-1c84a0e09093d728408024a6baa9967df596be54.tar.gz rneovim-1c84a0e09093d728408024a6baa9967df596be54.tar.bz2 rneovim-1c84a0e09093d728408024a6baa9967df596be54.zip |
Merge pull request #1108 from war1025/dev/for_all_tabs
FOR_ALL_TAB_WINDOWS cleanup. Add FOR_ALL_TABS and FOR_ALL_WINDOWS_IN_TAB.
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; } |