Hi, On Tue, Oct 20, 2020 at 1:32 AM lacygoill <[email protected]> wrote:
> I've noticed something else, although I'm not sure whether it could or > should be changed. > > When matchfuzzy*() filters a sequence of words, it is allowed to have > some overlapping between the positions of 2 different words. > > For example: > > echo matchfuzzy(['ftplugin-docs'], 'fun undo') > ['ftplugin-docs'] > > fun has been matched on these positions: > > v v v > ftplugin-docs > > undo has been matched on these positions: > > ftplugin-docs > ^ ^ ^^ > > If we place the two sets of positions on top of each other, we can see > that the start of the second set starts before the end of the first one: > > v v v > ftplugin-docs > ^ ^ ^^ > > Note that fzf(1) does the same thing, so maybe that's what people expect > (I don't; I would expect overlapping to be disallowed). I suspect that > changing this would make the performance drastically decrease; if so, > forget about this post. > > > Yes. Each word in the search pattern is separately fuzzy matched from the start of the text. So you may have overlapping matches. As you have already observed, fzf also uses a similar search algorithm. 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/CAAW7x7%3DUqbZZ0WcFM6TBxOYavdduiZh5sMvk8vXxaoqJ32cpAQ%40mail.gmail.com.
