0a8aa08
To: vim-dev@vim.org
0a8aa08
Subject: Patch 7.0.165
0a8aa08
Fcc: outbox
0a8aa08
From: Bram Moolenaar <Bram@moolenaar.net>
0a8aa08
Mime-Version: 1.0
0a8aa08
Content-Type: text/plain; charset=ISO-8859-1
0a8aa08
Content-Transfer-Encoding: 8bit
0a8aa08
------------
0a8aa08
0a8aa08
Patch 7.0.165
0a8aa08
Problem:    Using CTRL-L at the search prompt adds a "/" and other characters
0a8aa08
	    without escaping, causing the pattern not to match.
0a8aa08
Solution:   Escape special characters with a backslash.
0a8aa08
Files:	    src/ex_getln.c
0a8aa08
0a8aa08
0a8aa08
*** ../vim-7.0.164/src/ex_getln.c	Tue Oct 17 16:26:52 2006
0a8aa08
--- src/ex_getln.c	Tue Nov 14 21:36:13 2006
0a8aa08
***************
0a8aa08
*** 34,40 ****
0a8aa08
      int		xp_context;	/* type of expansion */
0a8aa08
  # ifdef FEAT_EVAL
0a8aa08
      char_u	*xp_arg;	/* user-defined expansion arg */
0a8aa08
!     int		input_fn;	/* Invoked for input() function */
0a8aa08
  # endif
0a8aa08
  };
0a8aa08
  
0a8aa08
--- 34,40 ----
0a8aa08
      int		xp_context;	/* type of expansion */
0a8aa08
  # ifdef FEAT_EVAL
0a8aa08
      char_u	*xp_arg;	/* user-defined expansion arg */
0a8aa08
!     int		input_fn;	/* when TRUE Invoked for input() function */
0a8aa08
  # endif
0a8aa08
  };
0a8aa08
  
0a8aa08
***************
0a8aa08
*** 1390,1396 ****
0a8aa08
--- 1390,1406 ----
0a8aa08
  		    {
0a8aa08
  			c = gchar_cursor();
0a8aa08
  			if (c != NUL)
0a8aa08
+ 			{
0a8aa08
+ 			    if (c == firstc || vim_strchr((char_u *)(
0a8aa08
+ 					    p_magic ? "\\^$.*[" : "\\^$"), c)
0a8aa08
+ 								      != NULL)
0a8aa08
+ 			    {
0a8aa08
+ 				/* put a backslash before special characters */
0a8aa08
+ 				stuffcharReadbuff(c);
0a8aa08
+ 				c = '\\';
0a8aa08
+ 			    }
0a8aa08
  			    break;
0a8aa08
+ 			}
0a8aa08
  		    }
0a8aa08
  		    goto cmdline_not_changed;
0a8aa08
  		}
0a8aa08
*** ../vim-7.0.164/src/version.c	Tue Nov 14 20:24:32 2006
0a8aa08
--- src/version.c	Tue Nov 21 11:28:43 2006
0a8aa08
***************
0a8aa08
*** 668,669 ****
0a8aa08
--- 668,671 ----
0a8aa08
  {   /* Add new patch number below this line */
0a8aa08
+ /**/
0a8aa08
+     165,
0a8aa08
  /**/
0a8aa08
0a8aa08
-- 
0a8aa08
       He was not in the least bit scared to be mashed into a pulp
0a8aa08
       Or to have his eyes gouged out and his elbows broken;
0a8aa08
       To have his kneecaps split and his body burned away
0a8aa08
       And his limbs all hacked and mangled, brave Sir Robin.
0a8aa08
                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
0a8aa08
0a8aa08
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
0a8aa08
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
0a8aa08
\\\        download, build and distribute -- http://www.A-A-P.org        ///
0a8aa08
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///