lkundrak / rpms / vim

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