diff --git a/autoload/airline/extensions/lsp.vim b/autoload/airline/extensions/lsp.vim index 8d82d127..4553a301 100644 --- a/autoload/airline/extensions/lsp.vim +++ b/autoload/airline/extensions/lsp.vim @@ -71,14 +71,14 @@ function! airline#extensions#lsp#progress() abort " show only most new progress let s:lsp_progress = s:lsp_progress[0] - if s:lsp_progress['message'] !=# '' && s:lsp_progress['percentage'] !=# 100 + if s:lsp_progress['message'] !=# '' let percent = '' - if s:lsp_progress['percentage'] >= 0 + if has_key(s:lsp_progress, 'percentage') && s:lsp_progress['percentage'] >= 0 let percent = ' ' . string(s:lsp_progress['percentage']) . '%' endif let s:title = s:lsp_progress['title'] let message = airline#util#shorten(s:lsp_progress['message'] . percent, 91, 9) - return s:lsp_progress['server'] . ':' . s:title . ' ' . message + return s:lsp_progress['server'] . ': ' . s:title . ' ' . message endif endif endif