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);
|
STRCAT(t, newcmd);
|
||||||
if (ins_prevcmd)
|
if (ins_prevcmd)
|
||||||
STRCAT(t, prevcmd);
|
STRCAT(t, prevcmd);
|
||||||
|
else
|
||||||
|
vim_free(t);
|
||||||
p = t + STRLEN(t);
|
p = t + STRLEN(t);
|
||||||
STRCAT(t, trailarg);
|
STRCAT(t, trailarg);
|
||||||
vim_free(newcmd);
|
vim_free(newcmd);
|
||||||
@@ -957,16 +959,12 @@ do_bang(
|
|||||||
}
|
}
|
||||||
} while (trailarg != NULL);
|
} while (trailarg != NULL);
|
||||||
|
|
||||||
// Don't do anything if there is no command as there isn't really anything
|
// Don't clear "prevcmd" if there is no command to run.
|
||||||
// useful in running "sh -c ''". Avoids changing "prevcmd".
|
if (STRLEN(newcmd) > 0)
|
||||||
if (STRLEN(newcmd) == 0)
|
|
||||||
{
|
{
|
||||||
vim_free(newcmd);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
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
|
||||||
{
|
{
|
||||||
|
@@ -268,8 +268,8 @@ func Test_shell_repeat()
|
|||||||
call assert_equal(['Cmd: [-c echo coconut]'], readfile('Xlog'))
|
call assert_equal(['Cmd: [-c echo coconut]'], readfile('Xlog'))
|
||||||
|
|
||||||
call writefile(['empty'], 'Xlog')
|
call writefile(['empty'], 'Xlog')
|
||||||
call feedkeys(":!\<CR>", 'xt') " :! is a no-op
|
call feedkeys(":!\<CR>", 'xt') " :!
|
||||||
call assert_equal(['empty'], readfile('Xlog'))
|
call assert_equal(['Cmd: [-c ]'], readfile('Xlog'))
|
||||||
|
|
||||||
call feedkeys(":!!\<CR>", 'xt') " :! doesn't clear previous command
|
call feedkeys(":!!\<CR>", 'xt') " :! doesn't clear previous command
|
||||||
call assert_equal(['Cmd: [-c echo coconut]'], readfile('Xlog'))
|
call assert_equal(['Cmd: [-c echo coconut]'], readfile('Xlog'))
|
||||||
|
@@ -695,6 +695,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
815,
|
||||||
/**/
|
/**/
|
||||||
814,
|
814,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user