diff --git a/plugin/fugitive.vim b/plugin/fugitive.vim index 3bcab0a..d272ffc 100644 --- a/plugin/fugitive.vim +++ b/plugin/fugitive.vim @@ -1000,7 +1000,7 @@ call s:command("-bang -bar -nargs=? -complete=customlist,s:EditComplete Gdiff :e augroup fugitive_diff autocmd! - autocmd BufWinLeave * if s:diff_window_count() == 2 && &diff && getbufvar(+expand(''), 'git_dir') !=# '' | windo call s:diff_off() | endif + autocmd BufWinLeave * if s:diff_window_count() == 2 && &diff && getbufvar(+expand(''), 'git_dir') !=# '' | execute 'windo call s:diff_off()' | endif autocmd BufWinEnter * if s:diff_window_count() == 1 && &diff && getbufvar(+expand(''), 'git_dir') !=# '' | call s:diff_off() | endif augroup END