From 14fca85231b523b3af70fbbf13d150d151fce721 Mon Sep 17 00:00:00 2001 From: Holger Rapp Date: Tue, 25 Feb 2014 23:01:58 +0100 Subject: [PATCH] Ups. Forgot to add this. --- pythonx/UltiSnips/snippet/source/file/snipmate.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pythonx/UltiSnips/snippet/source/file/snipmate.py b/pythonx/UltiSnips/snippet/source/file/snipmate.py index ec5e20e..e4fee9c 100644 --- a/pythonx/UltiSnips/snippet/source/file/snipmate.py +++ b/pythonx/UltiSnips/snippet/source/file/snipmate.py @@ -77,7 +77,8 @@ def _parse_snippet(line, lines): trigger, description = head_tail(line[len("snippet"):].lstrip()) content = "" while True: - if not lines.peek().startswith('\t'): + next_line = lines.peek() + if next_line is None or not next_line.startswith('\t'): break content += next(lines)[1:] # strip first tab content = content[:-1] # Chomp the last newline