From 29d7080d64bb35be3f4aee9d7bd60d26679f6fdb Mon Sep 17 00:00:00 2001 From: Holger Rapp Date: Sun, 12 Jul 2015 20:05:33 +0200 Subject: [PATCH] Do not set up inner state if it is already setup. This makes _(setup|teardown)_inner_state symmetric. --- pythonx/UltiSnips/snippet_manager.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pythonx/UltiSnips/snippet_manager.py b/pythonx/UltiSnips/snippet_manager.py index d6bdd50..c90bde8 100644 --- a/pythonx/UltiSnips/snippet_manager.py +++ b/pythonx/UltiSnips/snippet_manager.py @@ -336,6 +336,8 @@ class SnippetManager(object): def _setup_inner_state(self): """Map keys and create autocommands that should only be defined when a snippet is active.""" + if self._inner_state_up: + return if self.expand_trigger != self.forward_trigger: _vim.command('inoremap ' + self.forward_trigger + ' =UltiSnips#JumpForwards()')