diff options
author | Jurica Bradaric <jbradaric@gmail.com> | 2016-02-13 12:54:47 +0100 |
---|---|---|
committer | Jurica Bradaric <jbradaric@gmail.com> | 2016-02-16 07:18:48 +0100 |
commit | 3b34c992bc51bb065ca59f1f4903a4315f3d2e30 (patch) | |
tree | 52e239170f6575e6df4fb9ea7504de27c02db184 /src | |
parent | 5af9ae9e6064eabe98ec94896211af00e86632b5 (diff) | |
download | rneovim-3b34c992bc51bb065ca59f1f4903a4315f3d2e30.tar.gz rneovim-3b34c992bc51bb065ca59f1f4903a4315f3d2e30.tar.bz2 rneovim-3b34c992bc51bb065ca59f1f4903a4315f3d2e30.zip |
vim-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)
https://github.com/vim/vim/commit/23d1b62746dce048c80cc19e7e5af1d513b6b4cf
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/ex_docmd.c | 18 | ||||
-rw-r--r-- | src/nvim/version.c | 2 |
2 files changed, 14 insertions, 6 deletions
diff --git a/src/nvim/ex_docmd.c b/src/nvim/ex_docmd.c index dfae2b849d..11338424f3 100644 --- a/src/nvim/ex_docmd.c +++ b/src/nvim/ex_docmd.c @@ -2679,17 +2679,25 @@ set_one_cmd_context ( p = cmd + 1; } else { p = cmd; - while (ASCII_ISALPHA(*p) || *p == '*') /* Allow * wild card */ + while (ASCII_ISALPHA(*p) || *p == '*') { // Allow * wild card ++p; - /* check for non-alpha command */ - if (p == cmd && vim_strchr((char_u *)"@*!=><&~#", *p) != NULL) - ++p; - /* for python 3.x: ":py3*" commands completion */ + } + // 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') { ++p; 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/nvim/version.c b/src/nvim/version.c index 4de63ebb10..499ad4c3b4 100644 --- a/src/nvim/version.c +++ b/src/nvim/version.c @@ -393,7 +393,7 @@ static int included_patches[] = { 898, // 897 NA // 896, - // 895, + 895, // 894 NA // 893, // 892, |