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:
@@ -36,6 +36,7 @@ fun snipMate#expandSnip(col)
|
|||||||
" Autoindent snippet according to previous indentation
|
" Autoindent snippet according to previous indentation
|
||||||
let indent = matchend(line, '^.\{-}\ze\(\S\|$\)') + 1
|
let indent = matchend(line, '^.\{-}\ze\(\S\|$\)') + 1
|
||||||
call append(lnum, map(snip[1:], "'".strpart(line, 0, indent - 1)."'.v:val"))
|
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)
|
let snipLen = s:BuildTabStops(lnum, col - indent, indent)
|
||||||
unl g:snippet
|
unl g:snippet
|
||||||
|
|||||||
Reference in New Issue
Block a user