2016-09-15 7:41 GMT+09:00 Tony Mechelynck <antoine.mechely...@gmail.com>:

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

I looked into that a bit and found that it was not specific to GTK3.

The same thing happens with the latest GTK2 GUI and that of 7.4.1401, the
one just prior to the GTK3 patch inclusion.

I tried to do a bisect search to find which patch introduced that
regression, but failed due to a header file relocation on OS X as of 10.9,
Mavericks.  I was unable to build vim older than 7.4.62.  Nonetheless, I
confirm that the same regression was also seen with that version.

Looks it has been there unnoticed for a long time.

As for GTK3, if the GUI is linked against GTK+ 3.4 or later, tear-off menus
are disabled, as written in 'h: tear-off-menus'.

So, fixing the issue is quite easy for GTK >= 3.4; it can be fixed using a
version check.  But I'm not sure what I can do for the rest for now.

Best regards,
Kazunobu


>
>
> Best regards,
> Tony.
>
> --
> --
> 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 vim_dev+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
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 vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui