Fix bug in excluding Gstatus window from reuse
When Gstatus is the only window, executing Gdiff results in the Gstatus being reused for the diff split. Closes https://github.com/tpope/vim-fugitive/issues/853
This commit is contained in:
parent
3304c14c63
commit
c98d3cf38f
@ -2876,7 +2876,7 @@ endfunction
|
||||
|
||||
function! s:UsableWin(nr) abort
|
||||
return a:nr && !getwinvar(a:nr, '&previewwindow') &&
|
||||
\ (empty(getwinvar(a:nr, 'fugitive_status')) || getwinvar(a:nr, 'fugitive_type') !=# 'index') &&
|
||||
\ (empty(getwinvar(a:nr, 'fugitive_status')) || getbufvar(winbufnr(a:nr), 'fugitive_type') !=# 'index') &&
|
||||
\ index(['gitrebase', 'gitcommit'], getbufvar(winbufnr(a:nr), '&filetype')) < 0 &&
|
||||
\ index(['nofile','help','quickfix'], getbufvar(winbufnr(a:nr), '&buftype')) < 0
|
||||
endfunction
|
||||
|
Loading…
x
Reference in New Issue
Block a user