summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShougo Matsushita <Shougo.Matsu@gmail.com>2016-06-17 07:42:15 +0900
committerShougo Matsushita <Shougo.Matsu@gmail.com>2016-06-17 07:42:15 +0900
commit0b84100ae775a6a1d1436c81a71bbeaeba241ab6 (patch)
tree3e896a7945f8177d5bf3cb4493a67b87466ae958
parent54cd0d76162fa6c60a4f933387216ecc1369abf1 (diff)
downloaddeoplete.nvim-0b84100ae775a6a1d1436c81a71bbeaeba241ab6.zip
Improve start completion
-rw-r--r--autoload/deoplete/init.vim1
-rw-r--r--rplugin/python3/deoplete/deoplete.py4
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': "\<Plug>(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("\<Plug>(deoplete_start_complete)")')
+ self.__vim.feedkeys(context['start_complete'])
def gather_candidates(self, context):
self.check_recache(context)