Christian Brabandt wrote:

> Bram,
> I maintain the popular eye-candy plugin vim-airline. For files 
> maintained in git, it checks the current branch and displays it in the 
> statusline using system('git status...') and caches the result, so that 
> it is not called to often. However after a ShellCmdPost autocommand, it 
> invalidates the cache and runs the command to update it (since the user 
> could have interacted with git using !git..)
> 
> However, calling system() after the ShellCmdPost means, that it will 
> overwrite v:shell_error and that means, that a user cannot check the 
> result properly, e.g. executing :! false followed by echo v:shell_error 
> will return 0 instead of 1 as expected. 
> 
> Therefore, could we please make v:shell_error writable, so that the 
> plugin can save and restore the old value and not interact with the 
> return code of a shell command as expected?
> 
> Attached is a patch, that would allow that. Please include.

Hmm, I hope we don't end up making all variables read-write.

Can we add a remark in the docs that it's writable only to be able to
save & restore it?


-- 
MORTICIAN:    What?
CUSTOMER:     Nothing -- here's your nine pence.
DEAD PERSON:  I'm not dead!
MORTICIAN:    Here -- he says he's not dead!
CUSTOMER:     Yes, he is.
DEAD PERSON:  I'm not!
                                  The Quest for the Holy Grail (Monty Python)

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
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