Tony Mechelynck wrote:
> exists() result is sometimes misleading for a command.
> Example (with GTK3 gvim linked with GTK 3.16.7):
> :echo exists(':tearoff')
> :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 -- b...@moolenaar.net -- 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
To unsubscribe from this group and stop receiving emails from it, send an email
For more options, visit https://groups.google.com/d/optout.