1
0
mirror of https://github.com/gryf/snipmate.vim.git synced 2026-01-05 13:24:17 +01:00

fixed bug when there is over 9 tab stops on the same line

This commit is contained in:
Michael Sanders
2009-06-06 13:55:51 -04:00
parent 2fed6ad159
commit 95e34f42a1

View File

@@ -120,7 +120,7 @@ fun s:BuildTabStops(snip, lnum, col, indent)
let withoutVars = substitute(a:snip, '$\d\+', '', 'g') let withoutVars = substitute(a:snip, '$\d\+', '', 'g')
while stridx(a:snip, '${'.i) != -1 while stridx(a:snip, '${'.i) != -1
let beforeTabStop = matchstr(withoutVars, '^.*\ze${'.i.'\D') let beforeTabStop = matchstr(withoutVars, '^.*\ze${'.i.'\D')
let withoutOthers = substitute(withoutVars, '${'.i.'\@!\d\+.\{-}}', '', 'g') let withoutOthers = substitute(withoutVars, '${\('.i.'\D\)\@!\d\+.\{-}}', '', 'g')
let j = i - 1 let j = i - 1
call add(snipPos, [0, 0, -1]) call add(snipPos, [0, 0, -1])