Skip to content

Commit e2a052a

Browse files
authored
Merge pull request #669 from hrsh7th/fix-user-data-clear
Fix #668
2 parents 64d514d + 56835a9 commit e2a052a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

autoload/lsp/ui/vim/completion.vim

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@ endfunction
2323
" 6. then the line is `call getbufline(|` in `s:on_complete_done_after`
2424
"
2525
function! s:on_complete_done() abort
26-
if empty(v:completed_item)
26+
" Somtimes, vim occurs `CompleteDone` unexpectedly.
27+
" We try to detect it by checking empty completed_item.
28+
if empty(v:completed_item) || get(v:completed_item, 'word', '') ==# '' && get(v:completed_item, 'abbr', '') ==# ''
2729
doautocmd User lsp_complete_done
2830
return
2931
endif

0 commit comments

Comments
 (0)