Fix #320 completed snippet behavior

This commit is contained in:
Shougo Matsushita 2016-01-14 07:27:43 +09:00
parent 6dd4ecf1fc
commit 7eb577c5d0
2 changed files with 3 additions and 5 deletions

View File

@ -379,10 +379,8 @@ function! neosnippet#parser#_get_completed_snippet(completed_item, next_text) "{
endfor
let snippet .= args
if a:next_text[:0] !=# pair
let snippet .= pair
let snippet .= '${' . cnt . '}'
endif
let snippet .= pair
let snippet .= '${' . cnt . '}'
return snippet
endfunction"}}}

View File

@ -117,7 +117,7 @@ function! s:suite.get_completed_snippet()
call s:assert.equals(neosnippet#parser#_get_completed_snippet({
\ 'word' : 'Dictionary(', 'abbr' : 'Dictionary(foo)',
\ 'menu' : '', 'info' : ''
\ }, ')'), '${1:#:foo}')
\ }, ')'), '${1:#:foo})${2}')
call s:assert.equals(neosnippet#parser#_get_completed_snippet({
\ 'word' : 'Dictionary', 'abbr' : 'Dictionary(foo)',