Merge pull request #2357 from miuirussia/patch-1
Fix error: key not present in dictionary "percentage"
This commit is contained in:
commit
cba392dd7a
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue