- Improved partial match condition.

This commit is contained in:
Shougo Matsushita 2012-11-02 21:11:35 +09:00
parent c05573a331
commit 8a2cc9f936

View File

@ -82,7 +82,7 @@ function! s:keyword_filter(snippets, cur_keyword_str)"{{{
" Uniq by real_name. " Uniq by real_name.
let dict = {} let dict = {}
if len(a:cur_keyword_str) > 1 if len(a:cur_keyword_str) > 1 && a:cur_keyword_str =~ '^\h\w*$'
" 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('stridx(v:val.filter_str, %s) >= 0', \ printf('stridx(v:val.filter_str, %s) >= 0',