Yegappan Lakshmanan wrote:

> Neovim has support for getting the Vim exit code using the
> v:exiting variable:
> 
> https://github.com/neovim/neovim/pull/5651
> 
> This is useful with the VimLeavePre and VimLeave autocommands.
> Vim usually exits with exit code 0 or 1. But a user can use the ":cquit"
> command to exit with different values. Should we port this to Vim?

I suppose it could be useful for the autocommands.
The help isn't very clear about when the value is valid.
There are four autocommand events related to exiting.
How about "QuitPre" ?

Also, v:exiting suggests it's a flag about whether Vim will exit.
But the help says it's the exit value.  Shouldn't it be v:exitvalue
then?

There are situations where Vim may exit, but it is cancelled (when using
a prompt or dialog).  What happens then?

-- 
MORTICIAN:    Bring out your dead!
              [clang]
              Bring out your dead!
              [clang]
              Bring out your dead!
CUSTOMER:     Here's one -- nine pence.
DEAD PERSON:  I'm not dead!
                                  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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/202011252108.0APL8bVv2167821%40masaka.moolenaar.net.

Raspunde prin e-mail lui