# HG changeset patch # User Christian Brabandt # Date 1444757405 -7200 # Node ID 0f2807c056874e7ab7c381f19d6ddbebdd17db8a # Parent aa92e9acfb6f5e751de37db5a43b44e7f666ae47 commit https://github.com/vim/vim/commit/23d1b62746dce048c80cc19e7e5af1d513b6b4cf Author: Bram Moolenaar Date: Tue Oct 13 19:18:04 2015 +0200 patch 7.4.895 Problem: Custom command line completion does not work for a command containing digits. Solution: Skip over the digits. (suggested by Yasuhiro Matsumoto) diff --git a/src/ex_docmd.c b/src/ex_docmd.c --- a/src/ex_docmd.c +++ b/src/ex_docmd.c @@ -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) diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -742,6 +742,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 895, +/**/ 894, /**/ 893,