Fix #400 Check eval snippet
This commit is contained in:
parent
0e829d51b1
commit
5bf290f923
@ -530,8 +530,10 @@ function! s:eval_snippet(snippet_text) abort "{{{
|
|||||||
endif
|
endif
|
||||||
let prev_match = matchend(a:snippet_text,
|
let prev_match = matchend(a:snippet_text,
|
||||||
\ '\\\@<!`.\{-}\\\@<!`', match)
|
\ '\\\@<!`.\{-}\\\@<!`', match)
|
||||||
let snip_word .= eval(
|
let expr = a:snippet_text[match+1 : prev_match - 2]
|
||||||
\ a:snippet_text[match+1 : prev_match - 2])
|
if expr != ''
|
||||||
|
let snip_word .= eval(expr)
|
||||||
|
endif
|
||||||
|
|
||||||
let match = match(a:snippet_text, '\\\@<!`.\{-}\\\@<!`', prev_match)
|
let match = match(a:snippet_text, '\\\@<!`.\{-}\\\@<!`', prev_match)
|
||||||
endwhile
|
endwhile
|
||||||
|
Loading…
Reference in New Issue
Block a user