mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-12 13:23:52 -05:00
Avoid double reload of status window triggered by BufEnter
The second reload was short-circuited by a reltime() check, so no big deal, but it does get in the way when trying to make the reload conditional. References: https://github.com/tpope/vim-fugitive/issues/2207
This commit is contained in:
@@ -4341,7 +4341,7 @@ function! s:ReloadTabStatus() abort
|
||||
while winnr <= winnr('$')
|
||||
if getbufvar(winbufnr(winnr), 'fugitive_type') ==# 'index'
|
||||
if winnr != winnr()
|
||||
execute winnr.'wincmd w'
|
||||
execute 'noautocmd' winnr.'wincmd w'
|
||||
let restorewinnr = 1
|
||||
endif
|
||||
try
|
||||
@@ -4349,7 +4349,7 @@ function! s:ReloadTabStatus() abort
|
||||
finally
|
||||
if exists('restorewinnr')
|
||||
unlet restorewinnr
|
||||
wincmd p
|
||||
noautocmd wincmd p
|
||||
endif
|
||||
endtry
|
||||
endif
|
||||
|
||||
Reference in New Issue
Block a user