Karsten Hopp 7c6f10
To: vim_dev@googlegroups.com
Karsten Hopp 7c6f10
Subject: Patch 7.4.209
Karsten Hopp 7c6f10
Fcc: outbox
Karsten Hopp 7c6f10
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp 7c6f10
Mime-Version: 1.0
Karsten Hopp 7c6f10
Content-Type: text/plain; charset=UTF-8
Karsten Hopp 7c6f10
Content-Transfer-Encoding: 8bit
Karsten Hopp 7c6f10
------------
Karsten Hopp 7c6f10
Karsten Hopp 7c6f10
Patch 7.4.209
Karsten Hopp 7c6f10
Problem:    When repeating a filter command "%" and "#" are expanded.
Karsten Hopp 7c6f10
Solution:   Escape the command when storing for redo. (Christian Brabandt)
Karsten Hopp 7c6f10
Files:	    src/ex_cmds.c
Karsten Hopp 7c6f10
Karsten Hopp 7c6f10
Karsten Hopp 7c6f10
*** ../vim-7.4.208/src/ex_cmds.c	2014-02-22 22:27:20.768904692 +0100
Karsten Hopp 7c6f10
--- src/ex_cmds.c	2014-03-19 17:40:01.138104365 +0100
Karsten Hopp 7c6f10
***************
Karsten Hopp 7c6f10
*** 1012,1018 ****
Karsten Hopp 7c6f10
  
Karsten Hopp 7c6f10
      if (bangredo)	    /* put cmd in redo buffer for ! command */
Karsten Hopp 7c6f10
      {
Karsten Hopp 7c6f10
! 	AppendToRedobuffLit(prevcmd, -1);
Karsten Hopp 7c6f10
  	AppendToRedobuff((char_u *)"\n");
Karsten Hopp 7c6f10
  	bangredo = FALSE;
Karsten Hopp 7c6f10
      }
Karsten Hopp 7c6f10
--- 1012,1029 ----
Karsten Hopp 7c6f10
  
Karsten Hopp 7c6f10
      if (bangredo)	    /* put cmd in redo buffer for ! command */
Karsten Hopp 7c6f10
      {
Karsten Hopp 7c6f10
! 	/* If % or # appears in the command, it must have been escaped.
Karsten Hopp 7c6f10
! 	 * Reescape them, so that redoing them does not substitute them by the
Karsten Hopp 7c6f10
! 	 * buffername. */
Karsten Hopp 7c6f10
! 	char_u *cmd = vim_strsave_escaped(prevcmd, (char_u *)"%#");
Karsten Hopp 7c6f10
! 
Karsten Hopp 7c6f10
! 	if (cmd != NULL)
Karsten Hopp 7c6f10
! 	{
Karsten Hopp 7c6f10
! 	    AppendToRedobuffLit(cmd, -1);
Karsten Hopp 7c6f10
! 	    vim_free(cmd);
Karsten Hopp 7c6f10
! 	}
Karsten Hopp 7c6f10
! 	else
Karsten Hopp 7c6f10
! 	    AppendToRedobuffLit(prevcmd, -1);
Karsten Hopp 7c6f10
  	AppendToRedobuff((char_u *)"\n");
Karsten Hopp 7c6f10
  	bangredo = FALSE;
Karsten Hopp 7c6f10
      }
Karsten Hopp 7c6f10
*** ../vim-7.4.208/src/version.c	2014-03-19 17:32:32.454097490 +0100
Karsten Hopp 7c6f10
--- src/version.c	2014-03-19 17:40:24.810104728 +0100
Karsten Hopp 7c6f10
***************
Karsten Hopp 7c6f10
*** 740,741 ****
Karsten Hopp 7c6f10
--- 740,743 ----
Karsten Hopp 7c6f10
  {   /* Add new patch number below this line */
Karsten Hopp 7c6f10
+ /**/
Karsten Hopp 7c6f10
+     209,
Karsten Hopp 7c6f10
  /**/
Karsten Hopp 7c6f10
Karsten Hopp 7c6f10
-- 
Karsten Hopp 7c6f10
System administrators are just like women: You can't live with them and you
Karsten Hopp 7c6f10
can't live without them.
Karsten Hopp 7c6f10
Karsten Hopp 7c6f10
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp 7c6f10
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp 7c6f10
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
Karsten Hopp 7c6f10
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///