summaryrefslogtreecommitdiff
path: root/src/usercmd.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-04-23 17:07:30 +0200
committerBram Moolenaar <Bram@vim.org>2020-04-23 17:07:30 +0200
commita72cfb80cd7aa589ad2a4fb8766ed6d30ea8ae33 (patch)
tree4e0ba772f84209f1d2364b6ed0c59db5f08530c7 /src/usercmd.c
parentf7b398c6a9476a2004a42555b731ebf47b866408 (diff)
downloadvim-git-a72cfb80cd7aa589ad2a4fb8766ed6d30ea8ae33.tar.gz
patch 8.2.0624: Vim9: no check for space before #commentv8.2.0624
Problem: Vim9: no check for space before #comment. Solution: Add space checks. Fix :throw with double quoted string.
Diffstat (limited to 'src/usercmd.c')
-rw-r--r--src/usercmd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/usercmd.c b/src/usercmd.c
index fc14430b6..cdc46a10b 100644
--- a/src/usercmd.c
+++ b/src/usercmd.c
@@ -1007,7 +1007,7 @@ ex_command(exarg_T *eap)
if (ASCII_ISALPHA(*p))
while (ASCII_ISALNUM(*p))
++p;
- if (!ends_excmd(*p) && !VIM_ISWHITE(*p))
+ if (!ends_excmd2(eap->arg, p) && !VIM_ISWHITE(*p))
{
emsg(_("E182: Invalid command name"));
return;
@@ -1018,7 +1018,7 @@ ex_command(exarg_T *eap)
// If there is nothing after the name, and no attributes were specified,
// we are listing commands
p = skipwhite(end);
- if (!has_attr && ends_excmd(*p))
+ if (!has_attr && ends_excmd2(eap->arg, p))
{
uc_list(name, end - name);
}