]> granicus.if.org Git - vim/commitdiff
patch 7.4.895 v7.4.895
authorBram Moolenaar <Bram@vim.org>
Tue, 13 Oct 2015 17:18:04 +0000 (19:18 +0200)
committerBram Moolenaar <Bram@vim.org>
Tue, 13 Oct 2015 17:18:04 +0000 (19:18 +0200)
Problem:    Custom command line completion does not work for a command
            containing digits.
Solution:   Skip over the digits. (suggested by Yasuhiro Matsumoto)

src/ex_docmd.c
src/version.c

index c3a01df9fb8b8fbf72fb8728e3e170c9c6e3210b..23514fb124c65e144b1018c951be22dbd68774d5 100644 (file)
@@ -3517,9 +3517,10 @@ set_one_cmd_context(xp, buff)
        p = cmd;
        while (ASCII_ISALPHA(*p) || *p == '*')    /* Allow * wild card */
            ++p;
-       /* check for non-alpha command */
-       if (p == cmd && vim_strchr((char_u *)"@*!=><&~#", *p) != NULL)
-           ++p;
+       /* a user command may contain digits */
+       if (ASCII_ISUPPER(cmd[0]))
+           while (ASCII_ISALNUM(*p) || *p == '*')
+               ++p;
        /* for python 3.x: ":py3*" commands completion */
        if (cmd[0] == 'p' && cmd[1] == 'y' && p == cmd + 2 && *p == '3')
        {
@@ -3527,6 +3528,9 @@ set_one_cmd_context(xp, buff)
            while (ASCII_ISALPHA(*p) || *p == '*')
                ++p;
        }
+       /* check for non-alpha command */
+       if (p == cmd && vim_strchr((char_u *)"@*!=><&~#", *p) != NULL)
+           ++p;
        len = (int)(p - cmd);
 
        if (len == 0)
index ee4908109040525e84d7a1fe241126d338130231..746b62959b9c670824169d983a5839ed884eadb4 100644 (file)
@@ -741,6 +741,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    895,
 /**/
     894,
 /**/