mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-11 12:53:52 -05:00
Close diffs when navigating from :Gstatus
This commit is contained in:
@@ -910,6 +910,16 @@ function! s:Edit(cmd,...) abort
|
|||||||
else
|
else
|
||||||
if &previewwindow && getbufvar('','fugitive_type') ==# 'index'
|
if &previewwindow && getbufvar('','fugitive_type') ==# 'index'
|
||||||
wincmd p
|
wincmd p
|
||||||
|
if &diff
|
||||||
|
let mywinnr = winnr()
|
||||||
|
for winnr in range(winnr('$'),1,-1)
|
||||||
|
if winnr != mywinnr && getwinvar(winnr,'&diff')
|
||||||
|
execute winnr.'wincmd w'
|
||||||
|
close
|
||||||
|
wincmd p
|
||||||
|
endif
|
||||||
|
endfor
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
return a:cmd.' '.s:fnameescape(file)
|
return a:cmd.' '.s:fnameescape(file)
|
||||||
endif
|
endif
|
||||||
|
|||||||
Reference in New Issue
Block a user