From 6d7f52bb6e95477a750001d2de1db5629718f06e Mon Sep 17 00:00:00 2001 From: mMontu Date: Sat, 5 Oct 2013 15:59:21 -0300 Subject: [PATCH] Include handling for expansion from list_snippets --- plugin/UltiSnips.vim | 6 ------ plugin/UltiSnips/__init__.py | 2 ++ 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/plugin/UltiSnips.vim b/plugin/UltiSnips.vim index 3a65ac8..191665e 100644 --- a/plugin/UltiSnips.vim +++ b/plugin/UltiSnips.vim @@ -136,18 +136,12 @@ function! CompensateForPUM() endif endfunction function! UltiSnips_ExpandSnippet() - if g:UltiSnipsClearJumpTrigger == 1 - call UltiSnips_MapInnerKeys() - endif exec g:_uspy "UltiSnips_Manager.expand()" return "" endfunction function! UltiSnips_ExpandSnippetOrJump() call CompensateForPUM() - if g:UltiSnipsClearJumpTrigger == 1 - call UltiSnips_MapInnerKeys() - endif exec g:_uspy "UltiSnips_Manager.expand_or_jump()" return "" endfunction diff --git a/plugin/UltiSnips/__init__.py b/plugin/UltiSnips/__init__.py index 7c8bd0b..e14b06f 100644 --- a/plugin/UltiSnips/__init__.py +++ b/plugin/UltiSnips/__init__.py @@ -880,6 +880,8 @@ class SnippetManager(object): """ Expands the given snippet, and handles everything that needs to be done with it. """ + if _vim.eval("g:UltiSnipsClearJumpTrigger") == "1": + _vim.command("call UltiSnips_MapInnerKeys()") # Adjust before, maybe the trigger is not the complete word text_before = before if snippet.matched: