summaryrefslogtreecommitdiff
path: root/autoload
diff options
context:
space:
mode:
authorShougo Matsushita <Shougo.Matsu@gmail.com>2017-03-06 08:34:30 +0900
committerShougo Matsushita <Shougo.Matsu@gmail.com>2017-03-09 07:34:34 +0900
commit2b2b71b91c06724ae42c652510d684cd09cd4011 (patch)
treedc754af210fbfe5d2163cf22b64a8e74519592d0 /autoload
parent189cedbd36f07ee134216a6fd7f976acdfe67d89 (diff)
downloaddeoplete.nvim-2b2b71b91c06724ae42c652510d684cd09cd4011.zip
Timers feature is needed
Diffstat (limited to 'autoload')
-rw-r--r--autoload/deoplete/handler.vim8
-rw-r--r--autoload/deoplete/init.vim8
2 files changed, 10 insertions, 6 deletions
diff --git a/autoload/deoplete/handler.vim b/autoload/deoplete/handler.vim
index 16f5fa8..fcfe032 100644
--- a/autoload/deoplete/handler.vim
+++ b/autoload/deoplete/handler.vim
@@ -25,7 +25,7 @@ endfunction
function! s:completion_check(event) abort
let delay = get(g:deoplete#_context, 'refresh', 0) ?
\ g:deoplete#auto_refresh_delay : g:deoplete#auto_complete_delay
- if has('timers') && delay > 0
+ if delay > 0
if exists('s:delay_timer')
call timer_stop(s:delay_timer.id)
endif
@@ -49,7 +49,7 @@ function! s:completion_delayed(timer) abort
endfunction
function! deoplete#handler#_async_timer_start() abort
- if !has('timers') || exists('s:async_timer')
+ if exists('s:async_timer')
return
endif
@@ -58,10 +58,6 @@ function! deoplete#handler#_async_timer_start() abort
\ function('s:completion_async'), {'repeat': -1})
endfunction
function! deoplete#handler#_async_timer_stop() abort
- if !has('timers')
- return
- endif
-
if exists('s:async_timer')
call timer_stop(s:async_timer.id)
unlet s:async_timer
diff --git a/autoload/deoplete/init.vim b/autoload/deoplete/init.vim
index 38e9d90..09a3ee9 100644
--- a/autoload/deoplete/init.vim
+++ b/autoload/deoplete/init.vim
@@ -40,6 +40,14 @@ function! deoplete#init#_channel() abort
return 1
endif
+ if !has('timers')
+ call deoplete#util#print_error(
+ \ 'deoplete.nvim does not work with this version.')
+ call deoplete#util#print_error(
+ \ 'It requires Neovim with timers support("+timers").')
+ return 1
+ endif
+
try
if !exists('g:loaded_remote_plugins')
runtime! plugin/rplugin.vim