mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-12 21:33:53 -05:00
Account for closing windows when reloading status
This commit is contained in:
@@ -2915,7 +2915,8 @@ endfunction
|
||||
function! s:ReloadTabStatus(...) abort
|
||||
let mytab = tabpagenr()
|
||||
let tab = a:0 ? a:1 : mytab
|
||||
for winnr in range(1, tabpagewinnr(tab, '$'))
|
||||
let winnr = 1
|
||||
while winnr <= tabpagewinnr(tab, '$')
|
||||
if getbufvar(tabpagebuflist(tab)[winnr-1], 'fugitive_type') ==# 'index'
|
||||
execute 'tabnext '.tab
|
||||
if winnr != winnr()
|
||||
@@ -2932,7 +2933,8 @@ function! s:ReloadTabStatus(...) abort
|
||||
execute 'tabnext '.mytab
|
||||
endtry
|
||||
endif
|
||||
endfor
|
||||
let winnr += 1
|
||||
endwhile
|
||||
unlet! t:fugitive_reload_status
|
||||
endfunction
|
||||
|
||||
|
||||
Reference in New Issue
Block a user