From e7bf502a6ae492f42a91d231864e25630286319b Mon Sep 17 00:00:00 2001 From: Luke Davis Date: Tue, 30 Jan 2024 23:21:03 +0000 Subject: [PATCH] Avoid resetting 'last accessed tab' status --- autoload/fugitive.vim | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim index 5f62ff7..3d6b0c6 100644 --- a/autoload/fugitive.vim +++ b/autoload/fugitive.vim @@ -4362,9 +4362,13 @@ function! fugitive#DidChange(...) abort if a:0 > 1 ? a:2 : (!a:0 || a:1 isnot# 0) let t = reltime() let t:fugitive_reload_status = t + let prevnr = tabpagenr('#') for tabnr in range(1, tabpagenr('$')) - call settabvar(tabnr, 'fugitive_reload_status', t) + if tabnr != prevnr + call settabvar(tabnr, 'fugitive_reload_status', t) + endif endfor + call settabvar(prevnr, 'fugitive_reload_status', t) call s:ReloadTabStatus() else call s:ReloadWinStatus()