From c0b03f1cac242d96837326d300f42a660306fc1a Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Sun, 31 Mar 2024 16:12:45 -0400 Subject: [PATCH] Restore winfixbuf consideration in status blur The revert in a83135b55b018a891e0803199c3d418010a404d8 was a bit too aggressive. We can support winfixbuf being set on the status buffer without setting it ourselves. --- autoload/fugitive.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim index dc30943..6b3d903 100644 --- a/autoload/fugitive.vim +++ b/autoload/fugitive.vim @@ -6203,7 +6203,7 @@ function! fugitive#DiffClose() abort endfunction 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)') if len(winnrs) exe winnrs[0].'wincmd w'