diff options
-rw-r--r-- | autoload/deoplete.vim | 1 | ||||
-rw-r--r-- | autoload/deoplete/mapping.vim | 4 |
2 files changed, 4 insertions, 1 deletions
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() ? "\<C-e>" : '' endfunction function! deoplete#cancel_popup() abort + call deoplete#handler#_skip_next_completion() return pumvisible() ? "\<C-e>" : '' 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 <silent> <Plug>_ \ <C-r>=deoplete#mapping#_complete()<CR> + inoremap <expr><C-y> deoplete#close_popup() + inoremap <expr><C-e> 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 |