diff options
author | Shougo Matsushita <Shougo.Matsu@gmail.com> | 2017-04-10 00:07:20 +0900 |
---|---|---|
committer | Shougo Matsushita <Shougo.Matsu@gmail.com> | 2017-04-10 00:07:20 +0900 |
commit | 9a3c2ec8b464bcd4e840c565c45f2d67464c2eed (patch) | |
tree | e235c74786103ef26f4aa46dc5d4c7399a2435de | |
parent | deb12ddb90316e2ce16324d0390da45dce754da3 (diff) | |
download | deoplete.nvim-9a3c2ec8b464bcd4e840c565c45f2d67464c2eed.zip |
Fix #460 improve mode() check
-rw-r--r-- | autoload/deoplete/handler.vim | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/autoload/deoplete/handler.vim b/autoload/deoplete/handler.vim index 473f0e4..f13f5d8 100644 --- a/autoload/deoplete/handler.vim +++ b/autoload/deoplete/handler.vim @@ -25,9 +25,12 @@ function! deoplete#handler#_init() abort endfunction function! s:completion_check(timer) abort - if mode() ==# 'i' - call s:do_complete() + if mode() !=# 'i' + call s:timer_end() + return endif + + call s:do_complete() endfunction function! s:do_complete() abort let context = g:deoplete#_context |