summaryrefslogtreecommitdiff
path: root/src/ex_cmds.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-04-20 19:42:10 +0200
committerBram Moolenaar <Bram@vim.org>2020-04-20 19:42:10 +0200
commit2c5ed4e3300378ce76c8d9c3818d6f73e5119f68 (patch)
tree1fa5e72a63e160710ee6fd59fef09c8f334d0808 /src/ex_cmds.c
parentfaac410409a8d693a0326ad9db42dca85419a391 (diff)
downloadvim-git-2c5ed4e3300378ce76c8d9c3818d6f73e5119f68.tar.gz
patch 8.2.0612: Vim9: no check for space before #commentv8.2.0612
Problem: Vim9: no check for space before #comment. Solution: Add space checks.
Diffstat (limited to 'src/ex_cmds.c')
-rw-r--r--src/ex_cmds.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/ex_cmds.c b/src/ex_cmds.c
index bd114631b..f38bdacb6 100644
--- a/src/ex_cmds.c
+++ b/src/ex_cmds.c
@@ -451,12 +451,9 @@ ex_sort(exarg_T *eap)
}
else if (!ASCII_ISALPHA(*p) && regmatch.regprog == NULL)
{
- s = skip_regexp(p + 1, *p, TRUE);
- if (*s != *p)
- {
- emsg(_(e_invalpat));
+ s = skip_regexp_err(p + 1, *p, TRUE);
+ if (s == NULL)
goto sortend;
- }
*s = NUL;
// Use last search pattern if sort pattern is empty.
if (s == p + 1)