On Sun, Jan 31, 2016 at 4:59 AM, Wang Shidong <[email protected]> wrote:
>
> but my vim --version show me
>
> VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Jan  2 2014 19:39:47)
> 包含补丁: 1-52

Regardless of which version you are running (in this case: 7.4.52),
has('patch-7.3.867') will always return 0 because the format of the
argument is incorrect.

To test for the presence of patch 7.3.867, you should use

    if (version > 703) || ((version == 703) && has('patch867'))

In the first parenthesis, version is preferable to v:version in order
to catch really old versions which knew about version but not about
v:version.
In the second parenthesis, version and v:version are equivalent
because these old versions have already been eliminated by
short-circuit evaluation.
Notice that the has() argument for the patch number includes neither
dot nor hyphen, and that the major-minor version must already be
known.

See ":help has-patch"


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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui