From 0b84100ae775a6a1d1436c81a71bbeaeba241ab6 Mon Sep 17 00:00:00 2001 From: Shougo Matsushita Date: Fri, 17 Jun 2016 07:42:15 +0900 Subject: Improve start completion --- autoload/deoplete/init.vim | 1 + rplugin/python3/deoplete/deoplete.py | 4 +--- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/autoload/deoplete/init.vim b/autoload/deoplete/init.vim index 0414a5b..f20a0f7 100644 --- a/autoload/deoplete/init.vim +++ b/autoload/deoplete/init.vim @@ -252,6 +252,7 @@ function! deoplete#init#_context(event, sources) abort "{{{ \ 'bufnr': bufnr('%'), \ 'bufname': bufname('%'), \ 'cwd': getcwd(), + \ 'start_complete': "\(deoplete_start_complete)", \ 'vars': filter(copy(g:), "stridx(v:key, 'deoplete#') == 0"), \ 'bufvars': filter(copy(b:), "stridx(v:key, 'deoplete#') == 0"), \ 'custom': deoplete#custom#get(), diff --git a/rplugin/python3/deoplete/deoplete.py b/rplugin/python3/deoplete/deoplete.py index a32b511..9fec6be 100644 --- a/rplugin/python3/deoplete/deoplete.py +++ b/rplugin/python3/deoplete/deoplete.py @@ -63,9 +63,7 @@ class Deoplete(logger.LoggingMixin): 'event': context['event'], } - # Note: cannot use vim.feedkeys() - self.__vim.command( - 'call feedkeys("\(deoplete_start_complete)")') + self.__vim.feedkeys(context['start_complete']) def gather_candidates(self, context): self.check_recache(context) -- cgit v1.2.3