From 67d1b65aa739b087fb3d32314c72f9ab4cf6764d Mon Sep 17 00:00:00 2001 From: "rygwdn@gmail.com" <> Date: Sun, 16 May 2010 21:38:55 -0300 Subject: [PATCH] removed another extra print, and fixed some comments --- UltiSnips/python.snippets | 1 - plugin/UltiSnips/TextObjects.py | 7 ++++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/UltiSnips/python.snippets b/UltiSnips/python.snippets index fa72df2..f3880df 100644 --- a/UltiSnips/python.snippets +++ b/UltiSnips/python.snippets @@ -25,7 +25,6 @@ class ${1:MyClass}(${2:object}): def __init__(self$4): """ ${5:TODO: Fill me in}`!p res = "" -print "test" snip.reset_indent() snip.shift(2) diff --git a/plugin/UltiSnips/TextObjects.py b/plugin/UltiSnips/TextObjects.py index d1dacca..e7ddec7 100644 --- a/plugin/UltiSnips/TextObjects.py +++ b/plugin/UltiSnips/TextObjects.py @@ -783,17 +783,18 @@ class PythonCode(TextObject): code = code.replace("\\`", "`") - # Add Some convenience to the code + # Find our containing snippet for snippet local data snippet = parent while snippet and not isinstance(snippet, SnippetInstance): try: snippet = snippet._parent except AttributeError: snippet = None - - self._code = "import re, os, vim, string, random\n" + code self._snip = SnippetUtil(indent, snippet) + # Add Some convenience to the code + self._code = "import re, os, vim, string, random\n" + code + TextObject.__init__(self, parent, start, end, "")