0
0
mirror of https://github.com/vim/vim.git synced 2025-09-26 04:04:07 -04:00

patch 9.0.0783: ":!" doesn't do anything but does update the previous command

Problem:    ":!" doesn't do anything but does update the previous command.
Solution:   Do not have ":!" change the previous command. (Martin Tournoij,
            closes #11372)
This commit is contained in:
Bram Moolenaar
2022-10-17 18:00:23 +01:00
parent 4bf67ec52e
commit 8107a2a8af
5 changed files with 41 additions and 1 deletions

View File

@@ -957,6 +957,11 @@ 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)
return;
vim_free(prevcmd);
prevcmd = newcmd;