- Improved partial filter.
This commit is contained in:
parent
343925a5c8
commit
f3eac08269
@ -85,8 +85,8 @@ function! s:keyword_filter(snippets, cur_keyword_str)"{{{
|
|||||||
if len(a:cur_keyword_str) > 1
|
if len(a:cur_keyword_str) > 1
|
||||||
" Use partial match by filter_str.
|
" Use partial match by filter_str.
|
||||||
let list = filter(values(a:snippets),
|
let list = filter(values(a:snippets),
|
||||||
\ printf('v:val.filter_str =~ %s',
|
\ printf('stridx(v:val.filter_str, %s) >= 0',
|
||||||
\ string(neocomplcache#keyword_escape(a:cur_keyword_str))))
|
\ string(a:cur_keyword_str)))
|
||||||
else
|
else
|
||||||
" Use default filter.
|
" Use default filter.
|
||||||
let list = neocomplcache#keyword_filter(
|
let list = neocomplcache#keyword_filter(
|
||||||
|
Loading…
Reference in New Issue
Block a user