> > 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.
> 
> I wonder whether we should change the default behavior, and ignore the
> fuzzy algorithm, unless an optional flag is passed.

Tough call.  The question is: do plugins rely on getcompletion() to
return the list like before, or do they rely on getcompletion() to
return what the user would get when doing completion on the command
line?

> 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,
>     })

If we do want this option, this would be a good way to do it.

-- 
A vacation is a period of travel during which you find that you
took twice as many clothes and half as much money as you needed.

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///                                                                      \\\
\\\        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
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/20220322195001.8F9681C22C9%40moolenaar.net.

Raspunde prin e-mail lui