From cef5a910ab3fd07900dbb8d8ef4f43f0d1fa3fff Mon Sep 17 00:00:00 2001 From: tracyone Date: Mon, 9 Oct 2023 22:38:38 +0800 Subject: [PATCH] complete: fix got definition issue Signed-off-by: tracyone --- autoload/te/complete.vim | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/autoload/te/complete.vim b/autoload/te/complete.vim index 1071dc0..3c84ad6 100644 --- a/autoload/te/complete.vim +++ b/autoload/te/complete.vim @@ -32,16 +32,17 @@ function! te#complete#goto_def(open_type) abort return 0 endif endif - if get(g:, 'feat_enable_complete', 0) - if g:complete_plugin_type.cur_val ==# 'YouCompleteMe' - let l:ret=s:YcmGotoDef() - endif + + if get(g:, 'feat_enable_complete', 0) && + \ g:complete_plugin_type.cur_val ==# 'YouCompleteMe' + let l:ret=s:YcmGotoDef() elseif get(g:, 'feat_enable_lsp') == 1 let l:ret=te#lsp#gotodefinion() else let l:ret = -1 endif + if te#env#SupportTimer() && l:ret == 0 call timer_start(200, function('te#complete#cstag'), {'repeat': 1}) elseif l:ret < 0