Fix error on failure to load buffer
This commit is contained in:
parent
598ad040b3
commit
9b9a81b170
@ -2685,7 +2685,7 @@ function! s:ReplaceCmd(cmd, ...) abort
|
|||||||
let tmp = tempname()
|
let tmp = tempname()
|
||||||
let err = s:WriteCmd(tmp, a:cmd, a:0 ? a:1 : '')
|
let err = s:WriteCmd(tmp, a:cmd, a:0 ? a:1 : '')
|
||||||
if v:shell_error
|
if v:shell_error
|
||||||
throw 'fugitive: ' . (len(err) ? err : filereadable(tmp) ? join(readfile(tmp), ' | ') : 'unknown error running ' . a:cmd)
|
call s:throw((len(err) ? err : filereadable(tmp) ? join(readfile(tmp), ' ') : 'unknown error running ' . a:cmd))
|
||||||
endif
|
endif
|
||||||
let fn = expand('%:p')
|
let fn = expand('%:p')
|
||||||
silent exe 'doau BufReadPre '.s:fnameescape(fn)
|
silent exe 'doau BufReadPre '.s:fnameescape(fn)
|
||||||
|
Loading…
Reference in New Issue
Block a user