summaryrefslogtreecommitdiff
path: root/src/ex_docmd.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-01-31 18:59:13 +0000
committerBram Moolenaar <Bram@vim.org>2022-01-31 18:59:13 +0000
commit68854a82fdedebf6ee0675d1abeae6fc627ff6bb (patch)
tree196b1e3c0184fc012e9a8cc7989932c56cabd99c /src/ex_docmd.c
parent9e0208f51cf1354ce0a7d3988133041a78681605 (diff)
downloadvim-git-68854a82fdedebf6ee0675d1abeae6fc627ff6bb.tar.gz
patch 8.2.4277: Vim9: an import does not shadow a command modifierv8.2.4277
Problem: Vim9: an import does not shadow a command modifier. Solution: Do not accept a command modifier followed by a dot.
Diffstat (limited to 'src/ex_docmd.c')
-rw-r--r--src/ex_docmd.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ex_docmd.c b/src/ex_docmd.c
index c55b34ddb..64dcd7e2b 100644
--- a/src/ex_docmd.c
+++ b/src/ex_docmd.c
@@ -2709,7 +2709,7 @@ ex_range_without_command(exarg_T *eap)
/*
* Check for an Ex command with optional tail.
* If there is a match advance "pp" to the argument and return TRUE.
- * If "noparen" is TRUE do not recognize the command followed by "(".
+ * If "noparen" is TRUE do not recognize the command followed by "(" or ".".
*/
static int
checkforcmd_opt(
@@ -2723,8 +2723,8 @@ checkforcmd_opt(
for (i = 0; cmd[i] != NUL; ++i)
if (((char_u *)cmd)[i] != (*pp)[i])
break;
- if (i >= len && !isalpha((*pp)[i])
- && (*pp)[i] != '_' && (!noparen || (*pp)[i] != '('))
+ if (i >= len && !isalpha((*pp)[i]) && (*pp)[i] != '_'
+ && (!noparen || ((*pp)[i] != '(' && (*pp)[i] != '.')))
{
*pp = skipwhite(*pp + i);
return TRUE;
@@ -2746,7 +2746,7 @@ checkforcmd(
}
/*
- * Check for an Ex command with optional tail, not followed by "(".
+ * Check for an Ex command with optional tail, not followed by "(" or ".".
* If there is a match advance "pp" to the argument and return TRUE.
*/
int