diff --git a/plugin/fugitive.vim b/plugin/fugitive.vim index f61d04b..ce06001 100644 --- a/plugin/fugitive.vim +++ b/plugin/fugitive.vim @@ -999,6 +999,7 @@ endfunction call s:command("-bang -bar -nargs=? -complete=customlist,s:EditComplete Gdiff :execute s:Diff(0,)") augroup fugitive_diff + autocmd! autocmd BufWinLeave * if s:diff_window_count() == 2 && &diff && getbufvar(+expand(''), 'git_dir') !=# '' | diffoff! | endif autocmd BufWinEnter * if s:diff_window_count() == 1 && &diff && getbufvar(+expand(''), 'git_dir') !=# '' | diffoff | endif augroup END