mirror of
https://github.com/neovim/neovim.git
synced 2025-10-01 15:38:33 +00:00
vim-patch:7.4.209
Problem: When repeating a filter command "%" and "#" are expanded. Solution: Escape the command when storing for redo. (Christian Brabandt) https://code.google.com/p/vim/source/detail?r=bb402c49379de97fcd475fbbbbdc5ed41e5dff07
This commit is contained in:

committed by
Thiago de Arruda

parent
4a13143263
commit
421c388bb7
@@ -930,8 +930,14 @@ void do_bang(int addr_count, exarg_T *eap, int forceit, int do_in, int do_out)
|
|||||||
vim_free(prevcmd);
|
vim_free(prevcmd);
|
||||||
prevcmd = newcmd;
|
prevcmd = newcmd;
|
||||||
|
|
||||||
if (bangredo) { /* put cmd in redo buffer for ! command */
|
if (bangredo) { /* put cmd in redo buffer for ! command */
|
||||||
AppendToRedobuffLit(prevcmd, -1);
|
/* If % or # appears in the command, it must have been escaped.
|
||||||
|
* Reescape them, so that redoing them does not substitute them by the
|
||||||
|
* buffername. */
|
||||||
|
char_u *cmd = vim_strsave_escaped(prevcmd, (char_u *)"%#");
|
||||||
|
|
||||||
|
AppendToRedobuffLit(cmd, -1);
|
||||||
|
vim_free(cmd);
|
||||||
AppendToRedobuff((char_u *)"\n");
|
AppendToRedobuff((char_u *)"\n");
|
||||||
bangredo = FALSE;
|
bangredo = FALSE;
|
||||||
}
|
}
|
||||||
|
@@ -252,7 +252,7 @@ static int included_patches[] = {
|
|||||||
//212,
|
//212,
|
||||||
//211,
|
//211,
|
||||||
//210,
|
//210,
|
||||||
//209,
|
209,
|
||||||
//208,
|
//208,
|
||||||
207,
|
207,
|
||||||
//206,
|
//206,
|
||||||
|
Reference in New Issue
Block a user