073263
To: vim_dev@googlegroups.com
073263
Subject: Patch 7.4.209
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.209
073263
Problem:    When repeating a filter command "%" and "#" are expanded.
073263
Solution:   Escape the command when storing for redo. (Christian Brabandt)
073263
Files:	    src/ex_cmds.c
073263
073263
073263
*** ../vim-7.4.208/src/ex_cmds.c	2014-02-22 22:27:20.768904692 +0100
073263
--- src/ex_cmds.c	2014-03-19 17:40:01.138104365 +0100
073263
***************
073263
*** 1012,1018 ****
073263
  
073263
      if (bangredo)	    /* put cmd in redo buffer for ! command */
073263
      {
073263
! 	AppendToRedobuffLit(prevcmd, -1);
073263
  	AppendToRedobuff((char_u *)"\n");
073263
  	bangredo = FALSE;
073263
      }
073263
--- 1012,1029 ----
073263
  
073263
      if (bangredo)	    /* put cmd in redo buffer for ! command */
073263
      {
073263
! 	/* If % or # appears in the command, it must have been escaped.
073263
! 	 * Reescape them, so that redoing them does not substitute them by the
073263
! 	 * buffername. */
073263
! 	char_u *cmd = vim_strsave_escaped(prevcmd, (char_u *)"%#");
073263
! 
073263
! 	if (cmd != NULL)
073263
! 	{
073263
! 	    AppendToRedobuffLit(cmd, -1);
073263
! 	    vim_free(cmd);
073263
! 	}
073263
! 	else
073263
! 	    AppendToRedobuffLit(prevcmd, -1);
073263
  	AppendToRedobuff((char_u *)"\n");
073263
  	bangredo = FALSE;
073263
      }
073263
*** ../vim-7.4.208/src/version.c	2014-03-19 17:32:32.454097490 +0100
073263
--- src/version.c	2014-03-19 17:40:24.810104728 +0100
073263
***************
073263
*** 740,741 ****
073263
--- 740,743 ----
073263
  {   /* Add new patch number below this line */
073263
+ /**/
073263
+     209,
073263
  /**/
073263
073263
-- 
073263
System administrators are just like women: You can't live with them and you
073263
can't live without them.
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    ///