jkunstle / rpms / vim

Forked from rpms/vim 3 years ago
Clone

Blame SOURCES/7.4.209

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