Return nothing when there is no lsp-progress

Fix: a literal '0' appears after filename on older versions of vim-lsp.

0c8164b1b3c8017770296320a67a164b3c2aad39 added support for showing lsp
progress, but didn't always explicitly return a value. Vim uses 0 as a
return value when none are supplied, so when used with an older version
of vim-lsp that doesn't have the progress feature a 0 appeared in the
statusline.
This commit is contained in:
David Briscoe 2021-01-13 15:22:34 -08:00
parent 0ca9576331
commit 74f1f0d990

View File

@ -80,9 +80,9 @@ function! airline#extensions#lsp#progress() abort
let message = airline#util#shorten(s:lsp_progress['message'] . percent, 91, 9)
return s:lsp_progress['server'] . ':' . s:title . ' ' . message
endif
return ''
endif
endif
return ''
endfunction
let s:timer = 0