Skip to content

Commit e7f646b

Browse files
committed
Merge branch 'dev'
2 parents d048993 + 1e8c52a commit e7f646b

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

autoload/easycomplete.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1996,7 +1996,7 @@ function! s:FirstCompleteRendering(start_pos, menuitems)
19961996
else
19971997
" distinct 只去重 bufkeyword 和 dict
19981998
let tmp_result = easycomplete#util#distinct(deepcopy(source_result))
1999-
let filtered_menu = easycomplete#util#CompleteMenuFilter(tmp_result, typing_word, 500)
1999+
let filtered_menu = easycomplete#util#CompleteMenuFilter(tmp_result, typing_word, 350)
20002000
endif
20012001
let filtered_menu = map(filtered_menu, function("easycomplete#util#PrepareInfoPlaceHolder"))
20022002
let g:easycomplete_stunt_menuitems = filtered_menu

autoload/easycomplete/util.vim

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1167,7 +1167,8 @@ function! easycomplete#util#CompleteMenuFilter(all_menu, word, maxlength)
11671167
" 和 word 不是一一对应的,通过word fuzzy 匹配的位置无法正确应用在 abbr 上
11681168
" 这里只 hack 了 vim,其他类型的文件未测试
11691169
let key_name = (&filetype == "vim") ? "abbr" : "word"
1170-
let matching_res = all_items->matchfuzzypos(word, {'key': key_name})
1170+
let matching_res = all_items->matchfuzzypos(word, {'key': key_name, 'matchseq': 1, "limit": a:maxlength})
1171+
" let matching_res = all_items->matchfuzzypos(word, {'key': key_name})
11711172
if g:env_is_nvim
11721173
return s:util_toolkit.complete_menu_filter(matching_res, word)
11731174
else

0 commit comments

Comments
 (0)