diff --git a/plugin/UltiSnips/__init__.py b/plugin/UltiSnips/__init__.py index 53a3b5f..f8642a7 100644 --- a/plugin/UltiSnips/__init__.py +++ b/plugin/UltiSnips/__init__.py @@ -416,7 +416,7 @@ class Snippet(object): v.append(line_ind + line[tabs:]) v = '\n'.join(v) - si = SnippetInstance(parent, indent, v, start, end, visual_content, + si = SnippetInstance(self, parent, indent, v, start, end, visual_content, last_re = self._last_re, globals = self._globals) return si diff --git a/plugin/UltiSnips/text_objects/_snippet_instance.py b/plugin/UltiSnips/text_objects/_snippet_instance.py index 4cb2158..81c5609 100755 --- a/plugin/UltiSnips/text_objects/_snippet_instance.py +++ b/plugin/UltiSnips/text_objects/_snippet_instance.py @@ -15,12 +15,12 @@ class SnippetInstance(EditableTextObject): also a TextObject because it has a start an end """ - def __init__(self, parent, indent, initial_text, start, end, visual_content, last_re, globals): + def __init__(self, snippet, parent, indent, initial_text, start, end, visual_content, last_re, globals): if start is None: start = Position(0,0) if end is None: end = Position(0,0) - + self.snippet = snippet self._cts = 0 self.locals = {"match" : last_re}