Hi list.

When number is contained in command name like below, -customlist,XXX doesn't 
work.

function! s:complete(a,b,c)
  return ["foo", "bar", "baz"]
endfunction


command! -nargs=1 -complete=customlist,<SID>complete A123 echo <q-args>

Below is a patch to tix this problem.

- mattn

diff --git a/src/ex_docmd.c b/src/ex_docmd.c
index c3a01df..7509fe0 100644
--- a/src/ex_docmd.c
+++ b/src/ex_docmd.c
@@ -3515,8 +3515,11 @@ set_one_cmd_context(xp, buff)
     else
     {
        p = cmd;
-       while (ASCII_ISALPHA(*p) || *p == '*')    /* Allow * wild card */
+       if (ASCII_ISALPHA(*p) || *p == '*') {    /* Allow * wild card */
            ++p;
+           while (ASCII_ISALNUM(*p) || *p == '*')
+               ++p;
+       }
        /* check for non-alpha command */
        if (p == cmd && vim_strchr((char_u *)"@*!=><&~#", *p) != NULL)
            ++p;

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui