patch 9.1.0713: Newline causes E749 in Ex mode
Problem: Newline causes E749 in Ex mode (after 9.1.0573).
Solution: Don't execute empty command followed by a newline.
closes: #15614
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
diff --git a/src/ex_docmd.c b/src/ex_docmd.c
index 2a59301..0e69d5c 100644
--- a/src/ex_docmd.c
+++ b/src/ex_docmd.c
@@ -2916,6 +2916,11 @@
}
return FAIL;
}
+ if (eap->nextcmd == NULL && *eap->cmd == '\n')
+ {
+ eap->nextcmd = eap->cmd + 1;
+ return FAIL;
+ }
if (*eap->cmd == NUL)
{
if (!skip_only)
diff --git a/src/testdir/test_ex_mode.vim b/src/testdir/test_ex_mode.vim
index aa94935..19d0bec 100644
--- a/src/testdir/test_ex_mode.vim
+++ b/src/testdir/test_ex_mode.vim
Binary files differ
diff --git a/src/version.c b/src/version.c
index 1ba85a9..f53da01 100644
--- a/src/version.c
+++ b/src/version.c
@@ -705,6 +705,8 @@
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 713,
+/**/
712,
/**/
711,