From 0615cd2baf15ed0aebacd3546015a89d491553ef Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Sat, 16 Oct 2021 10:23:13 -0400 Subject: [PATCH] Ignore v:cmdbang when not in autocommand --- autoload/fugitive.vim | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim index 6776f3c..5af4c4f 100644 --- a/autoload/fugitive.vim +++ b/autoload/fugitive.vim @@ -2551,7 +2551,7 @@ let s:rebase_abbrevs = { \ 'b': 'break', \ } -function! fugitive#BufReadStatus() abort +function! fugitive#BufReadStatus(...) abort let amatch = s:Slash(expand('%:p')) let b:fugitive_type = 'index' unlet! b:fugitive_reltime @@ -2760,7 +2760,7 @@ function! fugitive#BufReadStatus() abort endif let b:fugitive_diff = diff - if v:cmdbang + if !a:0 && v:cmdbang unlet! b:fugitive_expanded endif let expanded = get(b:, 'fugitive_expanded', {'Staged': {}, 'Unstaged': {}}) @@ -4099,7 +4099,7 @@ function! s:ReloadStatusBuffer(...) abort endif let original_lnum = a:0 ? a:1 : line('.') let info = s:StageInfo(original_lnum) - call fugitive#BufReadStatus() + call fugitive#BufReadStatus(1) call setpos('.', [0, s:StageSeek(info, original_lnum), 1, 0]) return '' endfunction