mirror of
https://github.com/vim/vim.git
synced 2025-09-25 03:54:15 -04:00
patch 9.0.0815
This commit is contained in:
committed by
Bram Moolenaar
parent
436e5d395f
commit
9c50eeb401
@@ -929,6 +929,8 @@ do_bang(
|
||||
STRCAT(t, newcmd);
|
||||
if (ins_prevcmd)
|
||||
STRCAT(t, prevcmd);
|
||||
else
|
||||
vim_free(t);
|
||||
p = t + STRLEN(t);
|
||||
STRCAT(t, trailarg);
|
||||
vim_free(newcmd);
|
||||
@@ -957,17 +959,13 @@ do_bang(
|
||||
}
|
||||
} while (trailarg != NULL);
|
||||
|
||||
// Don't do anything if there is no command as there isn't really anything
|
||||
// useful in running "sh -c ''". Avoids changing "prevcmd".
|
||||
if (STRLEN(newcmd) == 0)
|
||||
// Don't clear "prevcmd" if there is no command to run.
|
||||
if (STRLEN(newcmd) > 0)
|
||||
{
|
||||
vim_free(newcmd);
|
||||
return;
|
||||
vim_free(prevcmd);
|
||||
prevcmd = newcmd;
|
||||
}
|
||||
|
||||
vim_free(prevcmd);
|
||||
prevcmd = newcmd;
|
||||
|
||||
if (bangredo) // put cmd in redo buffer for ! command
|
||||
{
|
||||
// If % or # appears in the command, it must have been escaped.
|
||||
|
Reference in New Issue
Block a user