man.vim: remove newline from man errors (#5852)

This commit is contained in:
Anmol Sethi 2017-01-01 09:09:27 -05:00 committed by Justin M. Keyes
parent 61d4ca214f
commit f6c4e0961d

View File

@ -106,7 +106,7 @@ function! s:system(cmd, ...) abort
throw printf('command interrupted: %s', join(a:cmd))
endif
if opts.exit_code != 0
throw printf("command error (%d) %s: %s", jobid, join(a:cmd), opts.stderr)
throw printf("command error (%d) %s: %s", jobid, join(a:cmd), substitute(opts.stderr, '\_s\+$', '', &gdefault ? '' : 'g'))
endif
return opts.stdout