I'm trying to enhance an old completion function. I'd like it to update the choices displayed in the popup menu as I type new charactersMy completion function isfunction! lh#icomplete#ecm(findstart, base) abort  if a:findstart    let l = getline('.')    let startcol = match(l[0:col('.')-1], '\v\S+$')    if startcol == -1      let startcol = col('.')-1    endif     let g:debug+= [findstart(.a:base.) -> .(startcol)]    return startcol  else     let g:debug += [matching(.a:base.)]    let words = ['un', 'deux', 'trois', 'trente-deux', 'unit']    call filter(words, 'v:val =~ a:base')     return { 'words' : words}    return { 'words' : words, 'refresh' : 'always'}  endifendfunctionThat I use with:set completefunc=lh#icomplete#ecm:inoremap  <c-x><c-u><c-p>From my understanding of the documentation, the fact I use <c-p>, I go into the third state (according to |ins-completion-menu|), and when I type any printable, non-white character I should be able to Add this character and reduce the number of matches.When I type in insert mode u, the completion menu pops-up as expected.Alas when I type x (just after the ), I'm out of completion mode and ux is what I get in my buffer.What did I do wrong or missed in the documentation?NB: I've seen that without refresh=always, results are filtered, except I'd like to call the function again in order to apply a custom filter.(Just in case, I'm using gvim 7.4-908)
Dynamic completion
autocompletion