Hi,

On Tue, Mar 22, 2022 at 10:47 AM lacygoill <[email protected]>
wrote:

> A plugin can save/restore the 'wildoptions' setting if needed to get the
> completion
> matches with fuzzy matching and without fuzzy matching.
>
> There might be existing scripts which work under the assumption that
> getcompletion() is not fuzzy. I have a few of them. But if a user with a
> recent Vim enables the fuzzy algorithm, then these scripts might break.
>
There are many built-in functions which are affected by the different
option values.
For example, the 'ignorecase' option affects the match() function and
'wildignorecase'
option affects the getcompletion() function. As Bram mentioned in his reply,
using the 'wildoption' value in getcompletion() will match with what a user
will see.


> I wonder whether we should change the default behavior, and ignore the
> fuzzy algorithm, unless an optional flag is passed. getcompletion()
> already accepts a third optional argument: filtered. Maybe it could
> accept a fourth one. Or – to avoid too many optional flags –
> getcompletion() could accept a dictionary as third argument:
>
> echo getcompletion('ignorecase', 'option', {
>
>     filtered: false,
>
>     fuzzy: false,
>
> })
>
>
In this case, the third argument to getcompletion() will either be a dict
or an boolean?

Regards,
Yegappan

-- 
-- 
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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/CAAW7x7kbvJu%3Dn6LGRgw8D8cer5g5ib64icvs0745fLjQ%2BiDSmg%40mail.gmail.com.

Raspunde prin e-mail lui