From 2febbe1f00be04f16daa6464cb39214a8566ec4b Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Mon, 13 Jun 2022 13:44:21 -0400 Subject: [PATCH] Make statusline redraw less aggressive Mainly trying to avoid tainting `:verbose set readonly?`. --- autoload/fugitive.vim | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim index c9b9e53..ce16048 100644 --- a/autoload/fugitive.vim +++ b/autoload/fugitive.vim @@ -4214,7 +4214,9 @@ function! s:DoAutocmdChanged(dir) abort finally unlet! g:fugitive_event g:fugitive_result " Force statusline reload with the buffer's Git dir - let &l:ro = &l:ro + if dir isnot# FugitiveGitDir() + let &l:ro = &l:ro + endif endtry return '' endfunction