On Nov 11, 2007 12:44 PM, thomas <[EMAIL PROTECTED]> wrote:
>
> I think you have to filter the list:
>
> let g:l = ['toto', 'tutu']
> function Completion(A, L, P)
>    return filter(copy(g:l), 'v:val =~ a:A')
> endfunction
>
> This looks like a slight inconsistency between the way custom and
> customlist
> completion works. :help customlist<cr>22j reveals though:
>
> > The function may use these for determining context.  For the "custom"
> > argument, it is not necessary to filter candidates against the (implicit
> > pattern in) ArgLead.  Vim will do filter the candidates with its regexp 
> > engine
> > after function return, and this is probably more efficient in most cases. 
> > For
> > the "customlist" argument, Vim will not filter the returned completion
> > candidates and the user supplied function should filter the candidates.

Thanks for the explanation and for the tip.

Xavier

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Raspunde prin e-mail lui