|
Karsten Hopp |
56cc3d |
To: vim_dev@googlegroups.com
|
|
Karsten Hopp |
56cc3d |
Subject: Patch 7.4.237
|
|
Karsten Hopp |
56cc3d |
Fcc: outbox
|
|
Karsten Hopp |
56cc3d |
From: Bram Moolenaar <Bram@moolenaar.net>
|
|
Karsten Hopp |
56cc3d |
Mime-Version: 1.0
|
|
Karsten Hopp |
56cc3d |
Content-Type: text/plain; charset=UTF-8
|
|
Karsten Hopp |
56cc3d |
Content-Transfer-Encoding: 8bit
|
|
Karsten Hopp |
56cc3d |
------------
|
|
Karsten Hopp |
56cc3d |
|
|
Karsten Hopp |
56cc3d |
Patch 7.4.237 (after 7.4.236)
|
|
Karsten Hopp |
56cc3d |
Problem: When some patches was not included has("patch-7.4.123") may return
|
|
Karsten Hopp |
56cc3d |
true falsely.
|
|
Karsten Hopp |
56cc3d |
Solution: Check for the specific patch number.
|
|
Karsten Hopp |
56cc3d |
Files: runtime/doc/eval.txt, src/eval.c
|
|
Karsten Hopp |
56cc3d |
|
|
Karsten Hopp |
56cc3d |
|
|
Karsten Hopp |
56cc3d |
*** ../vim-7.4.236/runtime/doc/eval.txt 2014-04-01 22:08:51.008677463 +0200
|
|
Karsten Hopp |
56cc3d |
--- runtime/doc/eval.txt 2014-04-02 12:09:35.991983552 +0200
|
|
Karsten Hopp |
56cc3d |
***************
|
|
Karsten Hopp |
56cc3d |
*** 1681,1687 ****
|
|
Karsten Hopp |
56cc3d |
is 501. Read-only. "version" also works, for backwards
|
|
Karsten Hopp |
56cc3d |
compatibility.
|
|
Karsten Hopp |
56cc3d |
Use |has()| to check if a certain patch was included, e.g.: >
|
|
Karsten Hopp |
56cc3d |
! if has("patch123")
|
|
Karsten Hopp |
56cc3d |
< Note that patch numbers are specific to the version, thus both
|
|
Karsten Hopp |
56cc3d |
version 5.0 and 5.1 may have a patch 123, but these are
|
|
Karsten Hopp |
56cc3d |
completely different.
|
|
Karsten Hopp |
56cc3d |
--- 1682,1688 ----
|
|
Karsten Hopp |
56cc3d |
is 501. Read-only. "version" also works, for backwards
|
|
Karsten Hopp |
56cc3d |
compatibility.
|
|
Karsten Hopp |
56cc3d |
Use |has()| to check if a certain patch was included, e.g.: >
|
|
Karsten Hopp |
56cc3d |
! if has("patch-7.4.123")
|
|
Karsten Hopp |
56cc3d |
< Note that patch numbers are specific to the version, thus both
|
|
Karsten Hopp |
56cc3d |
version 5.0 and 5.1 may have a patch 123, but these are
|
|
Karsten Hopp |
56cc3d |
completely different.
|
|
Karsten Hopp |
56cc3d |
***************
|
|
Karsten Hopp |
56cc3d |
*** 6397,6415 ****
|
|
Karsten Hopp |
56cc3d |
< *has-patch*
|
|
Karsten Hopp |
56cc3d |
3. Included patches. The "patch123" feature means that patch 123 has been
|
|
Karsten Hopp |
56cc3d |
included. Note that this form does not check the version of Vim, you need
|
|
Karsten Hopp |
56cc3d |
! to inspect |v:version| for that:
|
|
Karsten Hopp |
56cc3d |
Example (checking version 6.2.148 or later): >
|
|
Karsten Hopp |
56cc3d |
:if v:version > 602 || v:version == 602 && has("patch148")
|
|
Karsten Hopp |
56cc3d |
< Note that it's possible for patch 147 to be omitted even though 148 is
|
|
Karsten Hopp |
56cc3d |
included.
|
|
Karsten Hopp |
56cc3d |
|
|
Karsten Hopp |
56cc3d |
! 4. Beyond a certain patch level. The "patch-7.4.123" feature means that
|
|
Karsten Hopp |
56cc3d |
! the Vim version is 7.4 and patch 123 or later was included, or the Vim
|
|
Karsten Hopp |
56cc3d |
! version is later than 7.4.
|
|
Karsten Hopp |
56cc3d |
The example above can be simplified to: >
|
|
Karsten Hopp |
56cc3d |
:if has("patch-6.2.148")
|
|
Karsten Hopp |
56cc3d |
! < Note that this does not check if the patch was actually included, some
|
|
Karsten Hopp |
56cc3d |
! patches may have been skipped. That is unusual though.
|
|
Karsten Hopp |
56cc3d |
|
|
Karsten Hopp |
56cc3d |
acl Compiled with |ACL| support.
|
|
Karsten Hopp |
56cc3d |
all_builtin_terms Compiled with all builtin terminals enabled.
|
|
Karsten Hopp |
56cc3d |
--- 6410,6428 ----
|
|
Karsten Hopp |
56cc3d |
< *has-patch*
|
|
Karsten Hopp |
56cc3d |
3. Included patches. The "patch123" feature means that patch 123 has been
|
|
Karsten Hopp |
56cc3d |
included. Note that this form does not check the version of Vim, you need
|
|
Karsten Hopp |
56cc3d |
! to inspect |v:version| for that.
|
|
Karsten Hopp |
56cc3d |
Example (checking version 6.2.148 or later): >
|
|
Karsten Hopp |
56cc3d |
:if v:version > 602 || v:version == 602 && has("patch148")
|
|
Karsten Hopp |
56cc3d |
< Note that it's possible for patch 147 to be omitted even though 148 is
|
|
Karsten Hopp |
56cc3d |
included.
|
|
Karsten Hopp |
56cc3d |
|
|
Karsten Hopp |
56cc3d |
! 4. Beyond a certain version or at a certain version and including a specific
|
|
Karsten Hopp |
56cc3d |
! patch. The "patch-7.4.123" feature means that the Vim version is 7.5 or
|
|
Karsten Hopp |
56cc3d |
! later, or it is version 7.4 and patch 123 was included.
|
|
Karsten Hopp |
56cc3d |
The example above can be simplified to: >
|
|
Karsten Hopp |
56cc3d |
:if has("patch-6.2.148")
|
|
Karsten Hopp |
56cc3d |
! < Note that it's possible for patch 147 to be omitted even though 148 is
|
|
Karsten Hopp |
56cc3d |
! included.
|
|
Karsten Hopp |
56cc3d |
|
|
Karsten Hopp |
56cc3d |
acl Compiled with |ACL| support.
|
|
Karsten Hopp |
56cc3d |
all_builtin_terms Compiled with all builtin terminals enabled.
|
|
Karsten Hopp |
56cc3d |
*** ../vim-7.4.236/src/eval.c 2014-04-01 22:08:51.016677463 +0200
|
|
Karsten Hopp |
56cc3d |
--- src/eval.c 2014-04-02 12:04:41.179987607 +0200
|
|
Karsten Hopp |
56cc3d |
***************
|
|
Karsten Hopp |
56cc3d |
*** 12647,12660 ****
|
|
Karsten Hopp |
56cc3d |
{
|
|
Karsten Hopp |
56cc3d |
int major = atoi((char *)name + 6);
|
|
Karsten Hopp |
56cc3d |
int minor = atoi((char *)name + 8);
|
|
Karsten Hopp |
56cc3d |
- int patch = atoi((char *)name + 10);
|
|
Karsten Hopp |
56cc3d |
|
|
Karsten Hopp |
56cc3d |
/* Expect "patch-9.9.01234". */
|
|
Karsten Hopp |
56cc3d |
n = (major < VIM_VERSION_MAJOR
|
|
Karsten Hopp |
56cc3d |
|| (major == VIM_VERSION_MAJOR
|
|
Karsten Hopp |
56cc3d |
&& (minor < VIM_VERSION_MINOR
|
|
Karsten Hopp |
56cc3d |
|| (minor == VIM_VERSION_MINOR
|
|
Karsten Hopp |
56cc3d |
! && patch <= highest_patch()))));
|
|
Karsten Hopp |
56cc3d |
}
|
|
Karsten Hopp |
56cc3d |
else
|
|
Karsten Hopp |
56cc3d |
n = has_patch(atoi((char *)name + 5));
|
|
Karsten Hopp |
56cc3d |
--- 12647,12659 ----
|
|
Karsten Hopp |
56cc3d |
{
|
|
Karsten Hopp |
56cc3d |
int major = atoi((char *)name + 6);
|
|
Karsten Hopp |
56cc3d |
int minor = atoi((char *)name + 8);
|
|
Karsten Hopp |
56cc3d |
|
|
Karsten Hopp |
56cc3d |
/* Expect "patch-9.9.01234". */
|
|
Karsten Hopp |
56cc3d |
n = (major < VIM_VERSION_MAJOR
|
|
Karsten Hopp |
56cc3d |
|| (major == VIM_VERSION_MAJOR
|
|
Karsten Hopp |
56cc3d |
&& (minor < VIM_VERSION_MINOR
|
|
Karsten Hopp |
56cc3d |
|| (minor == VIM_VERSION_MINOR
|
|
Karsten Hopp |
56cc3d |
! && has_patch(atoi((char *)name + 10))))));
|
|
Karsten Hopp |
56cc3d |
}
|
|
Karsten Hopp |
56cc3d |
else
|
|
Karsten Hopp |
56cc3d |
n = has_patch(atoi((char *)name + 5));
|
|
Karsten Hopp |
56cc3d |
*** ../vim-7.4.236/src/version.c 2014-04-01 22:08:51.016677463 +0200
|
|
Karsten Hopp |
56cc3d |
--- src/version.c 2014-04-02 12:10:48.911982549 +0200
|
|
Karsten Hopp |
56cc3d |
***************
|
|
Karsten Hopp |
56cc3d |
*** 736,737 ****
|
|
Karsten Hopp |
56cc3d |
--- 736,739 ----
|
|
Karsten Hopp |
56cc3d |
{ /* Add new patch number below this line */
|
|
Karsten Hopp |
56cc3d |
+ /**/
|
|
Karsten Hopp |
56cc3d |
+ 237,
|
|
Karsten Hopp |
56cc3d |
/**/
|
|
Karsten Hopp |
56cc3d |
|
|
Karsten Hopp |
56cc3d |
--
|
|
Karsten Hopp |
56cc3d |
hundred-and-one symptoms of being an internet addict:
|
|
Karsten Hopp |
56cc3d |
22. You've already visited all the links at Yahoo and you're halfway through
|
|
Karsten Hopp |
56cc3d |
Lycos.
|
|
Karsten Hopp |
56cc3d |
|
|
Karsten Hopp |
56cc3d |
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
|
|
Karsten Hopp |
56cc3d |
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
|
|
Karsten Hopp |
56cc3d |
\\\ an exciting new programming language -- http://www.Zimbu.org ///
|
|
Karsten Hopp |
56cc3d |
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|