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: