summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShougo Matsushita <Shougo.Matsu@gmail.com>2018-04-22 18:26:26 +0900
committerShougo Matsushita <Shougo.Matsu@gmail.com>2018-04-22 18:26:26 +0900
commit9d6c386a28ee3673ad86d4e61edaf9562cfc08c5 (patch)
treea4551d09a738c5bd983ee76795e3580cf8f68c94
parentc5bd286a9d91c9378164367d0c0ae0601bc1c6b1 (diff)
downloaddeoplete.nvim-9d6c386a28ee3673ad86d4e61edaf9562cfc08c5.zip
Fix #735 default mappings
-rw-r--r--autoload/deoplete.vim1
-rw-r--r--autoload/deoplete/mapping.vim4
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