diff options
author | Shougo <Shougo.Matsu@gmail.com> | 2019-09-24 08:00:16 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-09-24 08:00:16 +0900 |
commit | 93e22ff6c461d3fcf2bf0485885295f01d455a03 (patch) | |
tree | e774821ef8e4aa25e9b3df07296730e51fac3b70 /autoload | |
parent | 7f1d4d8b1f5dbf344f2d0d1f4b8c5d6a0aaa24a6 (diff) | |
parent | 3356b174e29f45a3394e9eced9322d2754dbeaba (diff) | |
download | deoplete.nvim-93e22ff6c461d3fcf2bf0485885295f01d455a03.zip |
Merge pull request #1020 from hrsh7th/prepare-textedit
Prepare to support textEdit
Diffstat (limited to 'autoload')
-rw-r--r-- | autoload/deoplete/handler.vim | 7 |
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 |