From a64a21083aa6075a89f4e884c95b6d422d2cb50b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=8B=94=E8=B5=A4?= Date: Wed, 10 Jan 2024 17:04:49 +0800 Subject: [PATCH] bugfix for vim loadingstop and loadingstrat error --- autoload/easycomplete/tabnine.vim | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/autoload/easycomplete/tabnine.vim b/autoload/easycomplete/tabnine.vim index 81baa11..43dec16 100644 --- a/autoload/easycomplete/tabnine.vim +++ b/autoload/easycomplete/tabnine.vim @@ -64,11 +64,15 @@ function! easycomplete#tabnine#TypingType() endfunction function! easycomplete#tabnine#LoadingStart() - call s:tabnine_toolkit.loading_start() + if easycomplete#tabnine#ready() + call s:tabnine_toolkit.loading_start() + endif endfunction function! easycomplete#tabnine#LoadingStop() - call s:tabnine_toolkit.loading_stop() + if easycomplete#tabnine#ready() + call s:tabnine_toolkit.loading_stop() + endif endfunction function! easycomplete#tabnine#SuggestFlagCheck() @@ -83,6 +87,9 @@ function! easycomplete#tabnine#SuggestFlagCheck() endfunction function! s:flush() + if easycomplete#tabnine#ready() + return + endif if exists("s:tabnine_hint_snippet") && empty(s:tabnine_hint_snippet) return endif