Permalink
Browse files

updated for version 7.4.237

Problem:    When some patches was not included has("patch-7.4.123") may return
            true falsely.
Solution:   Check for the specific patch number.
  • Loading branch information...
brammool committed Apr 2, 2014
1 parent 7f3be40 commit 6716d9af113a5c4bcc7fdf8fd24f3d633db386c7
Showing with 4 additions and 3 deletions.
  1. +1 −1 runtime/doc/eval.txt
  2. +1 −2 src/eval.c
  3. +2 −0 src/version.c
View
@@ -1682,7 +1682,7 @@ v:version Version number of Vim: Major version number times 100 plus
is 501. Read-only. "version" also works, for backwards
compatibility.
Use |has()| to check if a certain patch was included, e.g.: >
if has("patch123")
if has("patch-7.4.123")
< Note that patch numbers are specific to the version, thus both
version 5.0 and 5.1 may have a patch 123, but these are
completely different.
View
@@ -12647,14 +12647,13 @@ f_has(argvars, rettv)
{
int major = atoi((char *)name + 6);
int minor = atoi((char *)name + 8);
int patch = atoi((char *)name + 10);
/* Expect "patch-9.9.01234". */
n = (major < VIM_VERSION_MAJOR
|| (major == VIM_VERSION_MAJOR
&& (minor < VIM_VERSION_MINOR
|| (minor == VIM_VERSION_MINOR
&& patch <= highest_patch()))));
&& has_patch(atoi((char *)name + 10))))));
}
else
n = has_patch(atoi((char *)name + 5));
View
@@ -734,6 +734,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
237,
/**/
236,
/**/

0 comments on commit 6716d9a

Please sign in to comment.