Restore winfixbuf consideration in status blur

The revert in a83135b55b was a bit too
aggressive.  We can support winfixbuf being set on the status buffer
without setting it ourselves.
This commit is contained in:
Tim Pope
2024-03-31 16:12:45 -04:00
parent a83135b55b
commit c0b03f1cac

View File

@@ -6203,7 +6203,7 @@ function! fugitive#DiffClose() abort
endfunction endfunction
function! s:BlurStatus() abort function! s:BlurStatus() abort
if (&previewwindow || exists('w:fugitive_status')) && get(b:,'fugitive_type', '') ==# 'index' if (&previewwindow || getwinvar(winnr(), '&winfixbuf') is# 1 || exists('w:fugitive_status')) && get(b:, 'fugitive_type', '') ==# 'index'
let winnrs = filter([winnr('#')] + range(1, winnr('$')), 's:UsableWin(v:val)') let winnrs = filter([winnr('#')] + range(1, winnr('$')), 's:UsableWin(v:val)')
if len(winnrs) if len(winnrs)
exe winnrs[0].'wincmd w' exe winnrs[0].'wincmd w'