1
0
mirror of https://github.com/gryf/snipmate.vim.git synced 2025-12-20 21:08:01 +01:00

fixed bug with folding in snippets

This commit is contained in:
Michael Sanders
2009-03-29 11:45:47 -04:00
parent 0e850ccc1c
commit efa2ab895b

View File

@@ -36,6 +36,7 @@ fun snipMate#expandSnip(col)
" Autoindent snippet according to previous indentation
let indent = matchend(line, '^.\{-}\ze\(\S\|$\)') + 1
call append(lnum, map(snip[1:], "'".strpart(line, 0, indent - 1)."'.v:val"))
if &fen | exe lnum.','.(lnum + len(snip) - 1).'foldopen' | endif
let snipLen = s:BuildTabStops(lnum, col - indent, indent)
unl g:snippet