Blame SOURCES/7.4.237

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