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