mirror of
https://github.com/neovim/neovim.git
synced 2025-09-27 21:48:35 +00:00
vim-patch:9.1.0713: Newline causes E749 in Ex mode (#30254)
Problem: Newline causes E749 in Ex mode (after 9.1.0573).
Solution: Don't execute empty command followed by a newline.
closes: vim/vim#15614
2432b4a753
Cherry-pick code change from patch 8.2.3405.
This commit is contained in:
@@ -2499,6 +2499,17 @@ int parse_command_modifiers(exarg_T *eap, const char **errormsg, cmdmod_T *cmod,
|
||||
|
||||
// ignore comment and empty lines
|
||||
if (*eap->cmd == '"') {
|
||||
// a comment ends at a NL
|
||||
if (eap->nextcmd == NULL) {
|
||||
eap->nextcmd = vim_strchr(eap->cmd, '\n');
|
||||
if (eap->nextcmd != NULL) {
|
||||
eap->nextcmd++;
|
||||
}
|
||||
}
|
||||
return FAIL;
|
||||
}
|
||||
if (eap->nextcmd == NULL && *eap->cmd == '\n') {
|
||||
eap->nextcmd = eap->cmd + 1;
|
||||
return FAIL;
|
||||
}
|
||||
if (*eap->cmd == NUL) {
|
||||
|
Reference in New Issue
Block a user