diff options
author | Shougo Matsushita <Shougo.Matsu@gmail.com> | 2018-04-30 22:17:03 +0900 |
---|---|---|
committer | Shougo Matsushita <Shougo.Matsu@gmail.com> | 2018-04-30 22:17:03 +0900 |
commit | b66d6590537affa9543d90ee8f0fc7dbb60f170e (patch) | |
tree | bd0a132c5ecc1811843ec70361ff2c36b9cfe9d7 /autoload/deoplete.vim | |
parent | 2b1e914eba78f0951b7f3d59c558aa838f923a10 (diff) | |
download | deoplete.nvim-b66d6590537affa9543d90ee8f0fc7dbb60f170e.zip |
Fix #741 initialization
Diffstat (limited to 'autoload/deoplete.vim')
-rw-r--r-- | autoload/deoplete.vim | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/autoload/deoplete.vim b/autoload/deoplete.vim index 4c4d947..b0cdac4 100644 --- a/autoload/deoplete.vim +++ b/autoload/deoplete.vim @@ -9,20 +9,29 @@ function! deoplete#initialize() abort endfunction function! deoplete#is_enabled() abort call deoplete#initialize() - return deoplete#init#_is_enabled() + return deoplete#init#_is_handler_enabled() endfunction function! deoplete#enable() abort if deoplete#initialize() return 1 endif - return deoplete#init#_enable() + return deoplete#init#_enable_handler() endfunction function! deoplete#disable() abort - return deoplete#init#_disable() + if !deoplete#init#_channel_initialized() + return 1 + endif + + return deoplete#init#_disable_handler() endfunction function! deoplete#toggle() abort + if !deoplete#init#_channel_initialized() + return 1 + endif + return deoplete#is_enabled() ? - \ deoplete#init#_disable() : deoplete#init#_enable() + \ deoplete#init#_disable_handler() : + \ deoplete#init#_enable_handler() endfunction function! deoplete#enable_logging(level, logfile) abort |