From 9d6c386a28ee3673ad86d4e61edaf9562cfc08c5 Mon Sep 17 00:00:00 2001 From: Shougo Matsushita Date: Sun, 22 Apr 2018 18:26:26 +0900 Subject: Fix #735 default mappings --- autoload/deoplete.vim | 1 + autoload/deoplete/mapping.vim | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/autoload/deoplete.vim b/autoload/deoplete.vim index 34b7b5d..4c4d947 100644 --- a/autoload/deoplete.vim +++ b/autoload/deoplete.vim @@ -53,6 +53,7 @@ function! deoplete#smart_close_popup() abort return pumvisible() ? "\" : '' endfunction function! deoplete#cancel_popup() abort + call deoplete#handler#_skip_next_completion() return pumvisible() ? "\" : '' endfunction function! deoplete#refresh() abort diff --git a/autoload/deoplete/mapping.vim b/autoload/deoplete/mapping.vim index d55d4c6..177c305 100644 --- a/autoload/deoplete/mapping.vim +++ b/autoload/deoplete/mapping.vim @@ -7,6 +7,8 @@ function! deoplete#mapping#_init() abort inoremap _ \ =deoplete#mapping#_complete() + inoremap deoplete#close_popup() + inoremap deoplete#cancel_popup() endfunction function! deoplete#mapping#_completefunc(findstart, base) abort @@ -46,7 +48,7 @@ function! deoplete#mapping#_rpcrequest_wrapper(sources) abort \ deoplete#init#_context('Manual', a:sources)) endfunction function! deoplete#mapping#_undo_completion() abort - if !exists('v:completed_item') || empty(v:completed_item) + if empty(v:completed_item) return '' endif -- cgit v1.2.3