From a83135b55b018a891e0803199c3d418010a404d8 Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Thu, 28 Mar 2024 16:43:41 -0400 Subject: [PATCH] Revert "Set winfixbuf on status windows" This reverts commit 8d4e8d45385c63a0bf735fe1164772116bf0da0d. Once the dust has settled I'll reconsider. References: https://github.com/tpope/vim-fugitive/issues/2272 References: https://github.com/tpope/vim-fugitive/discussions/2275 References: https://github.com/tpope/vim-fugitive/issues/2276 References: https://github.com/tpope/vim-fugitive/issues/2278 References: https://github.com/tpope/vim-fugitive/issues/2282 References: https://github.com/tpope/vim-fugitive/issues/2286 --- autoload/fugitive.vim | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim index 4478dd5..dc30943 100644 --- a/autoload/fugitive.vim +++ b/autoload/fugitive.vim @@ -4162,9 +4162,7 @@ function! s:StatusCommand(line1, line2, range, count, bang, mods, reg, arg, args try let mods = s:Mods(a:mods, 'Edge') let file = fugitive#Find(':', dir) - let arg = ' +setl\ foldmarker=<<<<<<<<,>>>>>>>>' . - \ (exists('&winfixbuf') ? '\ winfixbuf' : '') . - \ '\|let\ w:fugitive_status=FugitiveGitDir() ' . + let arg = ' +setl\ foldmarker=<<<<<<<<,>>>>>>>>\|let\ w:fugitive_status=FugitiveGitDir() ' . \ s:fnameescape(file) for tabnr in [tabpagenr()] + (mods =~# '\' ? range(1, tabpagenr('$')) : []) let bufs = tabpagebuflist(tabnr) @@ -4178,9 +4176,6 @@ function! s:StatusCommand(line1, line2, range, count, bang, mods, reg, arg, args exe winnr . 'wincmd w' endif let w:fugitive_status = dir - if exists('&winfixbuf') - setlocal winfixbuf - endif 1 return '' endif @@ -6208,7 +6203,7 @@ function! fugitive#DiffClose() abort endfunction function! s:BlurStatus() abort - if (&previewwindow || getwinvar(winnr(), '&winfixbuf') is# 1 || exists('w:fugitive_status')) && get(b:, 'fugitive_type', '') ==# 'index' + if (&previewwindow || 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'