mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-08 03:23:46 -05:00
Avoid reuse of winfixbuf windows
References: https://github.com/tpope/vim-fugitive/issues/2272
This commit is contained in:
@@ -6071,6 +6071,7 @@ endfunction
|
||||
|
||||
function! s:UsableWin(nr) abort
|
||||
return a:nr && !getwinvar(a:nr, '&previewwindow') && !getwinvar(a:nr, '&winfixwidth') &&
|
||||
\ !getwinvar(a:nr, '&winfixbuf') &&
|
||||
\ (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', 'terminal'], getbufvar(winbufnr(a:nr), '&buftype')) < 0
|
||||
|
||||
Reference in New Issue
Block a user