Ignore v:cmdbang when not in autocommand

This commit is contained in:
Tim Pope
2021-10-16 10:23:13 -04:00
parent ca61174e9d
commit 0615cd2baf

View File

@@ -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