mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-13 13:53:51 -05:00
Ignore v:cmdbang when not in autocommand
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user