- Fixed for abbr.
This commit is contained in:
parent
e367cd6330
commit
343925a5c8
@ -83,10 +83,10 @@ function! s:keyword_filter(snippets, cur_keyword_str)"{{{
|
|||||||
let dict = {}
|
let dict = {}
|
||||||
|
|
||||||
if len(a:cur_keyword_str) > 1
|
if len(a:cur_keyword_str) > 1
|
||||||
" Use partial match by abbr.
|
" Use partial match by filter_str.
|
||||||
let list = filter(values(a:snippets),
|
let list = filter(values(a:snippets),
|
||||||
\ printf('v:val.abbr =~ %s',
|
\ printf('v:val.filter_str =~ %s',
|
||||||
\ string(neocomplcache#keyword_escape(a:cur_keyword_str))))
|
\ string(neocomplcache#keyword_escape(a:cur_keyword_str))))
|
||||||
else
|
else
|
||||||
" Use default filter.
|
" Use default filter.
|
||||||
let list = neocomplcache#keyword_filter(
|
let list = neocomplcache#keyword_filter(
|
||||||
|
@ -214,7 +214,7 @@ function! s:initialize_snippet(dict, path, line, pattern, name)"{{{
|
|||||||
|
|
||||||
let dict = {
|
let dict = {
|
||||||
\ 'word' : a:dict.name, 'snip' : a:dict.word,
|
\ 'word' : a:dict.name, 'snip' : a:dict.word,
|
||||||
\ 'abbr' : a:dict.abbr,
|
\ 'filter_str' : a:dict.abbr,
|
||||||
\ 'description' : a:dict.word,
|
\ 'description' : a:dict.word,
|
||||||
\ 'menu' : menu_pattern . abbr,
|
\ 'menu' : menu_pattern . abbr,
|
||||||
\ 'options' : a:dict.options,
|
\ 'options' : a:dict.options,
|
||||||
|
Loading…
Reference in New Issue
Block a user