diff --git a/autoload/easycomplete.vim b/autoload/easycomplete.vim index d7c14b33..3305bea8 100644 --- a/autoload/easycomplete.vim +++ b/autoload/easycomplete.vim @@ -2195,6 +2195,15 @@ function! easycomplete#BufEnter() call timer_start(1600, { -> easycomplete#lint() }) endif endfunction + +function! easycomplete#finish() + try + finish + catch + " do nothing + endtry +endfunction + function! s:HasKey(...) return call('easycomplete#util#HasKey', a:000) endfunction diff --git a/plugin/easycomplete.vim b/plugin/easycomplete.vim index f0a865e9..acadec91 100644 --- a/plugin/easycomplete.vim +++ b/plugin/easycomplete.vim @@ -511,6 +511,7 @@ augroup easycomplete#NormalBinding autocmd TextChangedI * : call easycomplete#TextChangedI() autocmd TextChanged * call easycomplete#Textchanged() autocmd InsertEnter * call easycomplete#InsertEnter() + autocmd VimLeavePre * call easycomplete#finish() " SecondComplete Entry autocmd CompleteChanged * noa call easycomplete#CompleteChanged() autocmd TextChangedP * : noa call easycomplete#TextChangedP()