parent
f8bf95b9ff
commit
416165f063
@ -1392,8 +1392,18 @@ call s:command("-bar -nargs=* -complete=customlist,s:EditComplete Gsdiff :execut
|
||||
|
||||
augroup fugitive_diff
|
||||
autocmd!
|
||||
autocmd BufWinLeave * if &diff && s:diff_window_count() == 2 && getbufvar(+expand('<abuf>'), 'git_dir') !=# '' | call s:diffoff_all(getbufvar(+expand('<abuf>'), 'git_dir')) | endif
|
||||
autocmd BufWinEnter * if &diff && s:diff_window_count() == 1 && getbufvar(+expand('<abuf>'), 'git_dir') !=# '' | call s:diffoff() | endif
|
||||
autocmd BufWinLeave *
|
||||
\ if getwinvar(bufwinnr(+expand('<abuf>')), '&diff') &&
|
||||
\ s:diff_window_count() == 2 &&
|
||||
\ !empty(getbufvar(+expand('<abuf>'), 'git_dir')) |
|
||||
\ call s:diffoff_all(getbufvar(+expand('<abuf>'), 'git_dir')) |
|
||||
\ endif
|
||||
autocmd BufWinEnter *
|
||||
\ if getwinvar(bufwinnr(+expand('<abuf>')), '&diff') &&
|
||||
\ s:diff_window_count() == 1 &&
|
||||
\ !empty(getbufvar(+expand('<abuf>'), 'git_dir')) |
|
||||
\ call s:diffoff() |
|
||||
\ endif
|
||||
augroup END
|
||||
|
||||
function! s:diff_window_count() abort
|
||||
|
Loading…
Reference in New Issue
Block a user