summaryrefslogtreecommitdiff
path: root/autoload/deoplete/handler.vim
diff options
context:
space:
mode:
authorhrsh7th <hrsh7th@gmail.com>2019-09-21 22:40:28 +0900
committerhrsh7th <hrsh7th@gmail.com>2019-09-21 22:40:28 +0900
commit3356b174e29f45a3394e9eced9322d2754dbeaba (patch)
treee774821ef8e4aa25e9b3df07296730e51fac3b70 /autoload/deoplete/handler.vim
parent7f1d4d8b1f5dbf344f2d0d1f4b8c5d6a0aaa24a6 (diff)
downloaddeoplete.nvim-3356b174e29f45a3394e9eced9322d2754dbeaba.zip
Prepare to support textEdit
Diffstat (limited to 'autoload/deoplete/handler.vim')
-rw-r--r--autoload/deoplete/handler.vim7
1 files changed, 6 insertions, 1 deletions
diff --git a/autoload/deoplete/handler.vim b/autoload/deoplete/handler.vim
index ba502c5..9b7acf5 100644
--- a/autoload/deoplete/handler.vim
+++ b/autoload/deoplete/handler.vim
@@ -297,7 +297,12 @@ function! s:on_complete_done() abort
call deoplete#handler#_skip_next_completion()
if get(v:completed_item, 'user_data', '') !=# ''
- call s:substitute_suffix(json_decode(v:completed_item.user_data))
+ try
+ if type(v:completed_item.user_data) == type('')
+ call s:substitute_suffix(json_decode(v:completed_item.user_data))
+ endif
+ catch /.*/
+ endtry
endif
endfunction
function! s:substitute_suffix(user_data) abort