Do not forward v:shell_error on command fail.

airline#system#util for nvim used to fall back to 'system' implementation on
command error. This behavior caused conflict with other plugins if 'util' was
executed with a failing command as part of a ShellCmdPost event.

This commit makes 'util' interpret command error as persistent and not call
'system' in such a case.

This commit fixes #1317.
This commit is contained in:
Grzegorz Milka 2016-11-20 10:16:13 +01:00
parent 2dae2b364e
commit 241f324b39
1 changed files with 1 additions and 4 deletions

View File

@ -97,10 +97,7 @@ if has('nvim')
if l:id < 1
return system(a:cmd)
endif
let l:ret_code = jobwait([l:id])
if l:ret_code != [0]
return system(a:cmd)
endif
call jobwait([l:id])
return l:config.buf
endfunction
else