1
0
mirror of https://github.com/gryf/snipmate.vim.git synced 2026-01-08 07:04:11 +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) fun! ExtractSnipsFile(file)
if !filereadable(a:file) | return | endif if !filereadable(a:file) | return | endif
let text = readfile(a:file) let text = readfile(a:file)
let ft = fnamemodify(a:file, ':t:r') let ft = substitute(fnamemodify(a:file, ':t:r'), '\(.\{-}\)-.*', '\1', '')
let inSnip = 0 let inSnip = 0
for line in text + ["\n"] for line in text + ["\n"]
if inSnip && (line == '' || strpart(line, 0, 1) == "\t") if inSnip && (line == '' || strpart(line, 0, 1) == "\t")