Fix error on failure to load buffer

This commit is contained in:
Tim Pope 2018-07-18 19:57:56 -04:00
parent 598ad040b3
commit 9b9a81b170

View File

@ -2685,7 +2685,7 @@ function! s:ReplaceCmd(cmd, ...) abort
let tmp = tempname()
let err = s:WriteCmd(tmp, a:cmd, a:0 ? a:1 : '')
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
let fn = expand('%:p')
silent exe 'doau BufReadPre '.s:fnameescape(fn)