From be277461265f1e5c7db470aa479f30956597ea9e Mon Sep 17 00:00:00 2001 From: NAKAI Tsuyoshi <82267684+uga-rosa@users.noreply.github.com> Date: Fri, 15 Sep 2023 10:25:11 +0900 Subject: [PATCH] Fix bug in s:int() that only recognizes the first character (#273) --- autoload/vsnip/snippet/parser.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoload/vsnip/snippet/parser.vim b/autoload/vsnip/snippet/parser.vim index ddc6010..be0d1dc 100644 --- a/autoload/vsnip/snippet/parser.vim +++ b/autoload/vsnip/snippet/parser.vim @@ -37,7 +37,7 @@ let s:slash = s:token('/') let s:comma = s:token(',') let s:pipe = s:token('|') let s:varname = s:pattern('[_[:alpha:]]\w*') -let s:int = s:map(s:pattern('\d\+'), { value -> str2nr(value[0]) }) +let s:int = s:map(s:pattern('\d\+'), { value -> str2nr(value) }) let s:text = { stop, escape -> s:map( \ s:skip(stop, escape), \ { value -> {