1
0
mirror of https://github.com/gryf/snipmate.vim.git synced 2025-12-30 10:22:33 +01:00

fixed bug with hyphened *.snippets files

This commit is contained in:
Michael Sanders
2009-03-26 16:20:50 -04:00
parent 418c06ad4a
commit 4f093637f1

View File

@@ -73,7 +73,7 @@ endf
fun! ExtractSnipsFile(file)
if !filereadable(a:file) | return | endif
let text = readfile(a:file)
let ft = fnamemodify(a:file, ':t:r')
let ft = substitute(fnamemodify(a:file, ':t:r'), '\(.\{-}\)-.*', '\1', '')
let inSnip = 0
for line in text + ["\n"]
if inSnip && (line == '' || strpart(line, 0, 1) == "\t")