Hi, On Mon, Sep 14, 2020 at 10:13 AM Bram Moolenaar <[email protected]> wrote:
> > > > Internally, the fuzzy_match() function does have this information in > > > an array (matches). But returning this for a large number of matched > > > items will increase the run time of this function. As Bram asked, > > > what is the use case for this? > > > > To be able to show the user what was matched, like fzf, leaderf, > vim-clap or ctrlp do: > > > > https://i.imgur.com/FogkBBH.png > > OK, that seems useful. But in many cases we just want the result. > So this would be optional. > > I know that in the past we have used the same function and changed the > return type, but with type checking that can be problematic. Thus it > would be better to use a different function name for this. > matchfuzzypos() ? > > The new matchfuzzypos() function will return a list of lists: [ ["string1", [0, 2, 4]], ["asbtcr", [1, 3, 5] ] ] Each list item will be a list with two items. The first item is the matched string and the second item is a list with the list of matching positions. - 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%3DuwvYK27ejT9Wk_EyKh5H0KDBwDWZJfZJH65GJamC%2Brg%40mail.gmail.com.
