Hi Gary!

On Mi, 07 Dez 2016, Gary Johnson wrote:

> On 2016-09-28, Christian Brabandt wrote:
> 
> > Let me just withdraw the patch. I use async feature now to workaround.
> 
> I recently had a need to save and restore the value of v:shell_error
> and went looking for this discussion.  I had forgotten that you
> withdrew the patch.  FWIW, here's my workaround.  This is from
> a function that is called from a couple of autocommands.
> 
>     " Save current value of v:shell_error.
>     let l:shell_error = v:shell_error
> 
>     " Dummy example use of system() that also sets v:shell_error.
>     let stuff = system("do stuff")
> 
>     " Restore v:shell_error.
>     call system("exit ".l:shell_error)

Yeah, that workaround was also suggested in the vim-airline issue 
tracker. But to be honest it's ugly to overwrite the exit value by 
shelling out again.

Best,
Christian
-- 
Wo der Einzelne nur an sich denkt, wird die Gesamtheit nimmer vorwärts
kommen.
                -- Jakob Boßhart

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui