Tony Mechelynck wrote:

> exists() result is sometimes misleading for a command.
> Example (with GTK3 gvim linked with GTK 3.16.7):
>     :echo exists(':tearoff')
>         2
>     :tearoff &Help
>         E319: Sorry, the command is not available in this version
> So for example the following code in my vimrc would produce the exact
> error which it is meant to avoid:
>     au GUIEnter * if exists(':tearoff') == 2 | exe 'tearoff &Help' | endif
> If the :tearoff command is disabled in GTK3 gvim, then IMHO
> exists(':tearoff') ought to return 0, not 2.

exists() only checks if the command name is correct.  It does not check
whether the command is supported.

Can't change the return value now.  We could add exists("::tearoff") or
something like that.  It's going to be some work to implement that.

Error:015 - Unable to exit Windows.  Try the door.

 /// Bram Moolenaar -- --   \\\
///        sponsor Vim, vote for features -- \\\
\\\  an exciting new programming language --        ///
 \\\            help me help AIDS victims --    ///

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

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 
For more options, visit

Raspunde prin e-mail lui