{
compl_T *compl;
compl_T *shown_compl = NULL;
+ compl_T *after_first_compl = NULL;
int did_find_shown_match = FALSE;
int shown_match_ok = FALSE;
int i;
}
else if (compl_fuzzy_match)
{
+ if (i == 0)
+ after_first_compl = compl;
// Update the maximum fuzzy score and the shown match
// if the current item's score is higher
if (compl->cp_score > max_fuzzy_score)
{
shown_match_ok = TRUE;
cur = 0;
+ if (match_at_original_text(compl_shown_match))
+ compl_shown_match = after_first_compl;
}
}
call feedkeys("S\<C-x>\<C-o>fb\<C-p>\<C-p>\<C-p>\<C-p>", 'tx')
call assert_equal('fooBaz', g:word)
+ func Comp()
+ call complete(col('.'), ["fooBaz", "foobar", "foobala"])
+ return ''
+ endfunc
+ call feedkeys("i\<C-R>=Comp()\<CR>", 'tx')
+ call assert_equal('fooBaz', g:word)
+
" respect noselect
set completeopt+=noselect
call feedkeys("S\<C-x>\<C-o>fb", 'tx')
augroup! AAAAA_Group
delfunc OnPumChange
delfunc Omni_test
+ delfunc Comp
unlet g:item
unlet g:word
endfunc
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 487,
/**/
486,
/**/