lkundrak / rpms / vim

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