Hi Christian,

On Thu, Oct 15, 2020 at 8:55 AM Christian Brabandt <[email protected]>
wrote:

>
> On Do, 15 Okt 2020, Yegappan Lakshmanan wrote:
>
> > Hi,
> >
> > On Wed, Oct 14, 2020 at 11:21 PM Maxim Kim <[email protected]> wrote:
> >
> >     Hi, I wonder why "better" candidate has lower score than the others:
> >
> >     https://i.imgur.com/NPhKNsZ.png
> >
> >     tried to search `vimrc` and `.vim/vimrc` has lower score than `.vim/
> >     vimrc_colors`.
> >
> >
> >
> >
> > The reason is that 'vimrc' matches in multiple places in '.vim/vimrc' and
> > '.vim/vimrc_colors'. The scores for the various matches is below:
> >
> > For '.vim/vimrc':
> >
> >     'xxxxxvimrc'   140
> >     'xvxxxximrc'   135
> >     'xvimxxxxrc'   135
> >
> > For '.vim/vimrc_colors':
> >
> >     xxxxxvimrxxcxxxxx 148
> >     xxxxxvimrcxxxxxxx 133
> >     xvimxxxxrcxxxxxxx 128
> >
> > As you can see from the scores above, the match in '.vim/vimrc_colors'
> > has a higher score because of the "c" that occurs after an underscore.
> >
> > The match that occurs immediately after an underscore is given an
> additional
> > bonus score.
>
> Yeah, but shouldn't a complete match get an additional bonus?
>
>
>
Yes. A complete sequential match should get an additional bonus. But the
changes you posted only checks for whether the previous character is matched
and it doesn't check for a complete match. For example, when searching
for 'abc' in 'xabcy' and 'axxxxbc', it will give preference to axxxxbc than
xabcy.

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/CAAW7x7k%3DDF%2B1NyqRbKfqQ%3DmyvpQ4-YVzmWzXd96kso%2BtBiLsvQ%40mail.gmail.com.

Raspunde prin e-mail lui