jkunstle / rpms / vim

Forked from rpms/vim 3 years ago
Clone

Blame SOURCES/7.4.360

3ef2ca
To: vim_dev@googlegroups.com
3ef2ca
Subject: Patch 7.4.360
3ef2ca
Fcc: outbox
3ef2ca
From: Bram Moolenaar <Bram@moolenaar.net>
3ef2ca
Mime-Version: 1.0
3ef2ca
Content-Type: text/plain; charset=UTF-8
3ef2ca
Content-Transfer-Encoding: 8bit
3ef2ca
------------
3ef2ca
3ef2ca
Patch 7.4.360
3ef2ca
Problem:    In a regexp pattern a "$" followed by \v or \V is not seen as the
3ef2ca
	    end-of-line.
3ef2ca
Solution:   Handle the situation. (Ozaki Kiichi)
3ef2ca
Files:	    src/regexp.c
3ef2ca
3ef2ca
3ef2ca
*** ../vim-7.4.359/src/regexp.c	2014-05-13 19:37:19.489786520 +0200
3ef2ca
--- src/regexp.c	2014-07-09 19:28:51.871683287 +0200
3ef2ca
***************
3ef2ca
*** 3109,3123 ****
3ef2ca
  	    if (reg_magic >= MAGIC_OFF)
3ef2ca
  	    {
3ef2ca
  		char_u *p = regparse + 1;
3ef2ca
  
3ef2ca
! 		/* ignore \c \C \m and \M after '$' */
3ef2ca
  		while (p[0] == '\\' && (p[1] == 'c' || p[1] == 'C'
3ef2ca
! 				|| p[1] == 'm' || p[1] == 'M' || p[1] == 'Z'))
3ef2ca
  		    p += 2;
3ef2ca
  		if (p[0] == NUL
3ef2ca
  			|| (p[0] == '\\'
3ef2ca
  			    && (p[1] == '|' || p[1] == '&' || p[1] == ')'
3ef2ca
  				|| p[1] == 'n'))
3ef2ca
  			|| reg_magic == MAGIC_ALL)
3ef2ca
  		    curchr = Magic('$');
3ef2ca
  	    }
3ef2ca
--- 3109,3133 ----
3ef2ca
  	    if (reg_magic >= MAGIC_OFF)
3ef2ca
  	    {
3ef2ca
  		char_u *p = regparse + 1;
3ef2ca
+ 		int is_magic_all = (reg_magic == MAGIC_ALL);
3ef2ca
  
3ef2ca
! 		/* ignore \c \C \m \M \v \V and \Z after '$' */
3ef2ca
  		while (p[0] == '\\' && (p[1] == 'c' || p[1] == 'C'
3ef2ca
! 				|| p[1] == 'm' || p[1] == 'M'
3ef2ca
! 				|| p[1] == 'v' || p[1] == 'V' || p[1] == 'Z'))
3ef2ca
! 		{
3ef2ca
! 		    if (p[1] == 'v')
3ef2ca
! 			is_magic_all = TRUE;
3ef2ca
! 		    else if (p[1] == 'm' || p[1] == 'M' || p[1] == 'V')
3ef2ca
! 			is_magic_all = FALSE;
3ef2ca
  		    p += 2;
3ef2ca
+ 		}
3ef2ca
  		if (p[0] == NUL
3ef2ca
  			|| (p[0] == '\\'
3ef2ca
  			    && (p[1] == '|' || p[1] == '&' || p[1] == ')'
3ef2ca
  				|| p[1] == 'n'))
3ef2ca
+ 			|| (is_magic_all
3ef2ca
+ 			       && (p[0] == '|' || p[0] == '&' || p[0] == ')'))
3ef2ca
  			|| reg_magic == MAGIC_ALL)
3ef2ca
  		    curchr = Magic('$');
3ef2ca
  	    }
3ef2ca
*** ../vim-7.4.359/src/version.c	2014-07-09 19:13:45.007701718 +0200
3ef2ca
--- src/version.c	2014-07-09 19:18:36.599695792 +0200
3ef2ca
***************
3ef2ca
*** 736,737 ****
3ef2ca
--- 736,739 ----
3ef2ca
  {   /* Add new patch number below this line */
3ef2ca
+ /**/
3ef2ca
+     360,
3ef2ca
  /**/
3ef2ca
3ef2ca
-- 
3ef2ca
An indication you must be a manager:
3ef2ca
You believe you never have any problems in your life, just
3ef2ca
"issues" and "improvement opportunities".
3ef2ca
3ef2ca
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
3ef2ca
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
3ef2ca
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
3ef2ca
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///