summaryrefslogtreecommitdiff
path: root/autoload/deoplete.vim
diff options
context:
space:
mode:
authorShougo Matsushita <Shougo.Matsu@gmail.com>2017-06-25 13:02:45 +0900
committerShougo Matsushita <Shougo.Matsu@gmail.com>2017-06-25 13:02:45 +0900
commit03e449c981e3388516827506039915dd3afe3257 (patch)
tree5ae8a976b1d735fc3d704aff6f22281b468f78aa /autoload/deoplete.vim
parentd19ed16ee619409390b21607070c379862734601 (diff)
downloaddeoplete.nvim-03e449c981e3388516827506039915dd3afe3257.zip
Add deoplete#complete_common_string()
Diffstat (limited to 'autoload/deoplete.vim')
-rw-r--r--autoload/deoplete.vim17
1 files changed, 4 insertions, 13 deletions
diff --git a/autoload/deoplete.vim b/autoload/deoplete.vim
index 7ed9e09..19c71f7 100644
--- a/autoload/deoplete.vim
+++ b/autoload/deoplete.vim
@@ -61,18 +61,9 @@ function! deoplete#refresh() abort
endif
return pumvisible() ? "\<C-e>" : ''
endfunction
-
function! deoplete#undo_completion() abort
- if !exists('v:completed_item') || empty(v:completed_item)
- return ''
- endif
-
- let input = deoplete#util#get_input('')
- if strridx(input, v:completed_item.word) !=
- \ len(input) - len(v:completed_item.word)
- return ''
- endif
-
- return deoplete#smart_close_popup() .
- \ repeat("\<C-h>", strchars(v:completed_item.word))
+ return deoplete#mapping#_undo_completion()
+endfunction
+function! deoplete#complete_common_string() abort
+ return deoplete#mapping#_complete_common_string()
endfunction