summaryrefslogtreecommitdiffstats
path: root/src/cmdexpand.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2021-03-28 15:29:43 +0200
committerBram Moolenaar <Bram@vim.org>2021-03-28 15:29:43 +0200
commitdf749a2b9cab579b8c0ca6ca91889aa03d2da704 (patch)
treef0dffeb213e4259a74dbaa241e9f51562077d89f /src/cmdexpand.c
parentf49a1fcdb952ca270f108fcc27bb8ad6922e0807 (diff)
patch 8.2.2669: command line completion does not work after "vim9"v8.2.2669
Problem: Command line completion does not work after "vim9". Solution: Include the "9". (Naohiro Ono, closes #8025)
Diffstat (limited to 'src/cmdexpand.c')
-rw-r--r--src/cmdexpand.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/cmdexpand.c b/src/cmdexpand.c
index d51f5c6428..280b9e415c 100644
--- a/src/cmdexpand.c
+++ b/src/cmdexpand.c
@@ -1020,8 +1020,9 @@ set_one_cmd_context(
p = cmd;
while (ASCII_ISALPHA(*p) || *p == '*') // Allow * wild card
++p;
- // a user command may contain digits
- if (ASCII_ISUPPER(cmd[0]))
+ // A user command may contain digits.
+ // Include "9" for "vim9*" commands; "vim9cmd" and "vim9script".
+ if (ASCII_ISUPPER(cmd[0]) || STRNCMP("vim9", cmd, 4) == 0)
while (ASCII_ISALNUM(*p) || *p == '*')
++p;
// for python 3.x: ":py3*" commands completion