- Improved partial filter.

This commit is contained in:
Shougo Matsushita 2012-11-02 15:08:20 +09:00
parent 343925a5c8
commit f3eac08269

View File

@ -85,8 +85,8 @@ function! s:keyword_filter(snippets, cur_keyword_str)"{{{
if len(a:cur_keyword_str) > 1
" Use partial match by filter_str.
let list = filter(values(a:snippets),
\ printf('v:val.filter_str =~ %s',
\ string(neocomplcache#keyword_escape(a:cur_keyword_str))))
\ printf('stridx(v:val.filter_str, %s) >= 0',
\ string(a:cur_keyword_str)))
else
" Use default filter.
let list = neocomplcache#keyword_filter(