- Fixed s:get_sources_list().
This commit is contained in:
parent
a0600fa2fe
commit
97b0a2a246
@ -1,7 +1,7 @@
|
|||||||
"=============================================================================
|
"=============================================================================
|
||||||
" FILE: neosnippet.vim
|
" FILE: neosnippet.vim
|
||||||
" AUTHOR: Shougo Matsushita <Shougo.Matsu@gmail.com>
|
" AUTHOR: Shougo Matsushita <Shougo.Matsu@gmail.com>
|
||||||
" Last Modified: 17 Oct 2012.
|
" Last Modified: 18 Oct 2012.
|
||||||
" License: MIT license {{{
|
" License: MIT license {{{
|
||||||
" Permission is hereby granted, free of charge, to any person obtaining
|
" Permission is hereby granted, free of charge, to any person obtaining
|
||||||
" a copy of this software and associated documentation files (the
|
" a copy of this software and associated documentation files (the
|
||||||
@ -815,11 +815,8 @@ function! neosnippet#get_snippets()"{{{
|
|||||||
call neosnippet#make_cache('_')
|
call neosnippet#make_cache('_')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
" Get buffer filetype.
|
|
||||||
let filetype = neosnippet#get_filetype()
|
|
||||||
|
|
||||||
let snippets = {}
|
let snippets = {}
|
||||||
for source in s:get_sources_list(s:snippets, filetype)
|
for source in s:get_sources_list(s:snippets, neosnippet#get_filetype())
|
||||||
call extend(snippets, source, 'keep')
|
call extend(snippets, source, 'keep')
|
||||||
endfor
|
endfor
|
||||||
call extend(snippets, copy(s:snippets['_']), 'keep')
|
call extend(snippets, copy(s:snippets['_']), 'keep')
|
||||||
@ -846,7 +843,8 @@ function! neosnippet#get_filetype()"{{{
|
|||||||
endfunction"}}}
|
endfunction"}}}
|
||||||
function! s:get_sources_list(snippets, filetype)"{{{
|
function! s:get_sources_list(snippets, filetype)"{{{
|
||||||
return exists('*neocomplcache#get_sources_list') ?
|
return exists('*neocomplcache#get_sources_list') ?
|
||||||
\ neocomplcache#get_sources_list(a:snippets, a:filetype) : a:filetype
|
\ neocomplcache#get_sources_list(a:snippets, a:filetype) :
|
||||||
|
\ get(a:snippets, a:filetype, [])
|
||||||
endfunction"}}}
|
endfunction"}}}
|
||||||
|
|
||||||
function! neosnippet#edit_complete(arglead, cmdline, cursorpos)"{{{
|
function! neosnippet#edit_complete(arglead, cmdline, cursorpos)"{{{
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
"=============================================================================
|
"=============================================================================
|
||||||
" FILE: snippet.vim
|
" FILE: snippet.vim
|
||||||
" AUTHOR: Shougo Matsushita <Shougo.Matsu@gmail.com>
|
" AUTHOR: Shougo Matsushita <Shougo.Matsu@gmail.com>
|
||||||
" Last Modified: 15 Oct 2012.
|
" Last Modified: 18 Oct 2012.
|
||||||
" License: MIT license {{{
|
" License: MIT license {{{
|
||||||
" Permission is hereby granted, free of charge, to any person obtaining
|
" Permission is hereby granted, free of charge, to any person obtaining
|
||||||
" a copy of this software and associated documentation files (the
|
" a copy of this software and associated documentation files (the
|
||||||
@ -73,6 +73,7 @@ function! s:source.gather_candidates(args, context) "{{{
|
|||||||
\ 'action__pattern' : keyword.action__pattern,
|
\ 'action__pattern' : keyword.action__pattern,
|
||||||
\ 'source__menu' : keyword.menu,
|
\ 'source__menu' : keyword.menu,
|
||||||
\ 'source__snip' : keyword.snip,
|
\ 'source__snip' : keyword.snip,
|
||||||
|
\ 'source__snip_ref' : keyword,
|
||||||
\ }
|
\ }
|
||||||
|
|
||||||
call add(list, dict)
|
call add(list, dict)
|
||||||
@ -113,7 +114,7 @@ function! s:action_table.preview.func(candidates)"{{{
|
|||||||
endfor
|
endfor
|
||||||
endfunction"}}}
|
endfunction"}}}
|
||||||
|
|
||||||
let s:source.action_table['*'] = s:action_table
|
let s:source.action_table = s:action_table
|
||||||
unlet! s:action_table
|
unlet! s:action_table
|
||||||
"}}}
|
"}}}
|
||||||
|
|
||||||
|
@ -418,6 +418,7 @@ CHANGELOG *neosnippet-changelog*
|
|||||||
2012-10-17
|
2012-10-17
|
||||||
- Fixed alias problem.
|
- Fixed alias problem.
|
||||||
- Improved escape placeholder.
|
- Improved escape placeholder.
|
||||||
|
- Fixed s:get_sources_list().
|
||||||
|
|
||||||
2012-10-15
|
2012-10-15
|
||||||
- Improved lua snip.
|
- Improved lua snip.
|
||||||
|
Loading…
Reference in New Issue
Block a user