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