How to define fillter for filltering the word which I add them to list for autocomplete ?

I am trying to hook on CodeMirror and plug my own list of words to appear into the autocompletion. Based on this link CodeMirror AutoComplete Custom List - Stack Overflow

i add to list 3 words :

> inner.list.push(“mariano”);
> inner.list.push(“florencia”);
> inner.list.push(“zoe”);

The problem is that while my words do appear in the autocomplete,
they are not filtered correctly. For example, I type “f”, and then I do
ctrl+space. But I get all the 3 words in the popup with “mariano”
selected. I would expect to have only “Florencia” available and
selected.

Any ideas what I could be doing wrong?

The function that provides the completions is responsible for filtering based on cursor context, that’s why it is passed a CodeMirror instance.

this is link to sample … link why filltering not work ? …what I must to write to make it work ?How I can add filter to it ? @marijn