mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-12 21:33:53 -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('$')
|
while winnr <= winnr('$')
|
||||||
if getbufvar(winbufnr(winnr), 'fugitive_type') ==# 'index'
|
if getbufvar(winbufnr(winnr), 'fugitive_type') ==# 'index'
|
||||||
if winnr != winnr()
|
if winnr != winnr()
|
||||||
execute winnr.'wincmd w'
|
execute 'noautocmd' winnr.'wincmd w'
|
||||||
let restorewinnr = 1
|
let restorewinnr = 1
|
||||||
endif
|
endif
|
||||||
try
|
try
|
||||||
@@ -4349,7 +4349,7 @@ function! s:ReloadTabStatus() abort
|
|||||||
finally
|
finally
|
||||||
if exists('restorewinnr')
|
if exists('restorewinnr')
|
||||||
unlet restorewinnr
|
unlet restorewinnr
|
||||||
wincmd p
|
noautocmd wincmd p
|
||||||
endif
|
endif
|
||||||
endtry
|
endtry
|
||||||
endif
|
endif
|
||||||
|
|||||||
Reference in New Issue
Block a user