Fix #363 completed snippet parser
This commit is contained in:
parent
e2d91cba20
commit
65af2b9bca
@ -417,7 +417,7 @@ function! neosnippet#parser#_get_in_paren(key, pair, str) abort "{{{
|
||||
continue
|
||||
endif
|
||||
elseif c ==# a:pair
|
||||
if level == 1 && s != ''
|
||||
if level == 1 && (s != '' || a:str =~ '()\s*(.\{-})')
|
||||
return s
|
||||
else
|
||||
let level -= 1
|
||||
|
@ -30,6 +30,10 @@ function! s:suite.get_in_paren() abort
|
||||
\ '(', ')',
|
||||
\ 'wait() wait(long, int)'),
|
||||
\ 'long, int')
|
||||
call s:assert.equals(neosnippet#parser#_get_in_paren(
|
||||
\ '(', ')',
|
||||
\ 'wait() (long, int)'),
|
||||
\ '')
|
||||
endfunction
|
||||
|
||||
function! s:suite.get_completed_snippet() abort
|
||||
|
Loading…
Reference in New Issue
Block a user