Fix #368 select commas

This commit is contained in:
Shougo Matsushita
2017-01-09 18:19:16 +09:00
parent 61ffe8ba5a
commit 13c51ee885
2 changed files with 5 additions and 11 deletions

View File

@@ -359,11 +359,8 @@ function! neosnippet#parser#_get_completed_snippet(completed_item, cur_text, nex
for arg in split(substitute(
\ neosnippet#parser#_get_in_paren('<', '>', abbr),
\ '<\zs.\{-}\ze>', '', 'g'), '[^[]\zs\s*,\s*')
if args != '' && arg !=# '...'
let args .= ', '
endif
let args .= printf('${%d:#:%s%s}',
\ cnt, ((args != '' && arg ==# '...') ? ', ' : ''),
\ cnt, ((args != '') ? ', ' : ''),
\ escape(arg, '{}'))
let cnt += 1
endfor
@@ -385,11 +382,8 @@ function! neosnippet#parser#_get_completed_snippet(completed_item, cur_text, nex
continue
endif
if args != '' && arg !=# '...'
let args .= ', '
endif
let args .= printf('${%d:#:%s%s}',
\ cnt, ((args != '' && arg ==# '...') ? ', ' : ''),
\ cnt, ((args != '') ? ', ' : ''),
\ escape(arg, '{}'))
let cnt += 1
endfor