mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-14 14:23:51 -05:00
Perform automatic :diffoff on :Gdiffsplit /external/file buffers
Closes https://github.com/tpope/vim-fugitive/issues/1402
This commit is contained in:
@@ -4525,14 +4525,11 @@ endfunction
|
|||||||
function! s:diffoff_all(dir) abort
|
function! s:diffoff_all(dir) abort
|
||||||
let curwin = winnr()
|
let curwin = winnr()
|
||||||
for nr in range(1,winnr('$'))
|
for nr in range(1,winnr('$'))
|
||||||
if getwinvar(nr,'&diff')
|
if getwinvar(nr, '&diff') && !empty(getwinvar(nr, 'fugitive_diff_restore'))
|
||||||
if nr != winnr()
|
if nr != winnr()
|
||||||
execute nr.'wincmd w'
|
execute nr.'wincmd w'
|
||||||
let restorewinnr = 1
|
|
||||||
endif
|
|
||||||
if s:Dir() ==# a:dir
|
|
||||||
call s:diffoff()
|
|
||||||
endif
|
endif
|
||||||
|
call s:diffoff()
|
||||||
endif
|
endif
|
||||||
endfor
|
endfor
|
||||||
execute curwin.'wincmd w'
|
execute curwin.'wincmd w'
|
||||||
|
|||||||
Reference in New Issue
Block a user