mirror of
https://github.com/neovim/neovim.git
synced 2025-10-03 16:36:30 +00:00
vim-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 vim/vim#11372)
8107a2a8af
Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
@@ -1012,6 +1012,12 @@ void do_bang(int addr_count, exarg_T *eap, bool forceit, bool do_in, bool do_out
|
||||
}
|
||||
} 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;
|
||||
}
|
||||
|
||||
xfree(prevcmd);
|
||||
prevcmd = newcmd;
|
||||
|
||||
|
Reference in New Issue
Block a user