Fix #316 select mode jump behavior

This commit is contained in:
Shougo Matsushita 2015-12-31 10:33:00 +09:00
parent 50a25a35a2
commit 688cb202bc

View File

@ -224,10 +224,16 @@ endfunction"}}}
" Plugin key-mappings. " Plugin key-mappings.
function! neosnippet#mappings#expand_or_jump_impl() function! neosnippet#mappings#expand_or_jump_impl()
return neosnippet#mappings#_trigger(s:SID_PREFIX().'snippets_expand_or_jump') return mode() ==# 's' ?
\ neosnippet#mappings#_trigger('neosnippet#view#_jump') :
\ neosnippet#mappings#_trigger(
\ s:SID_PREFIX().'snippets_expand_or_jump')
endfunction endfunction
function! neosnippet#mappings#jump_or_expand_impl() function! neosnippet#mappings#jump_or_expand_impl()
return neosnippet#mappings#_trigger(s:SID_PREFIX().'snippets_jump_or_expand') return mode() ==# 's' ?
\ neosnippet#mappings#_trigger('neosnippet#view#_jump') :
\ neosnippet#mappings#_trigger(
\ s:SID_PREFIX().'snippets_jump_or_expand')
endfunction endfunction
function! neosnippet#mappings#expand_impl() function! neosnippet#mappings#expand_impl()
return neosnippet#mappings#_trigger(s:SID_PREFIX().'snippets_expand') return neosnippet#mappings#_trigger(s:SID_PREFIX().'snippets_expand')