diff options
author | Shougo Matsushita <Shougo.Matsu@gmail.com> | 2017-09-14 08:37:02 +0900 |
---|---|---|
committer | Shougo Matsushita <Shougo.Matsu@gmail.com> | 2017-09-14 08:37:02 +0900 |
commit | c8f7a7284825fb0d29e55fecbf22b7578e9394cc (patch) | |
tree | a9b06e2389e69d2b8179bfd24e9009614d4b56d0 /autoload/deoplete.vim | |
parent | 32989c32380ea42c1d3d485fe04cc341bd8f3eb7 (diff) | |
download | deoplete.nvim-c8f7a7284825fb0d29e55fecbf22b7578e9394cc.zip |
Fix #540 deoplete#is_enabled()
Diffstat (limited to 'autoload/deoplete.vim')
-rw-r--r-- | autoload/deoplete.vim | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/autoload/deoplete.vim b/autoload/deoplete.vim index 585a663..8a10b34 100644 --- a/autoload/deoplete.vim +++ b/autoload/deoplete.vim @@ -7,6 +7,10 @@ function! deoplete#initialize() abort return deoplete#init#_initialize() endfunction +function! deoplete#is_enabled() abort + call deoplete#initialize() + return deoplete#init#_is_enabled() +endfunction function! deoplete#enable() abort if deoplete#initialize() return 1 @@ -17,8 +21,7 @@ function! deoplete#disable() abort return deoplete#init#_disable() endfunction function! deoplete#toggle() abort - call deoplete#initialize() - return deoplete#init#_is_enabled() ? + return deoplete#is_enabled() ? \ deoplete#init#_disable() : deoplete#init#_enable() endfunction @@ -27,7 +30,7 @@ function! deoplete#enable_logging(level, logfile) abort endfunction function! deoplete#manual_complete(...) abort - if deoplete#initialize() + if !deoplete#is_enabled() return endif |