From 74f1f0d990abd0b3c14db7f01ba65261be21c9f3 Mon Sep 17 00:00:00 2001 From: David Briscoe Date: Wed, 13 Jan 2021 15:22:34 -0800 Subject: [PATCH] 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. --- autoload/airline/extensions/lsp.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoload/airline/extensions/lsp.vim b/autoload/airline/extensions/lsp.vim index 82cd5002..8d82d127 100644 --- a/autoload/airline/extensions/lsp.vim +++ b/autoload/airline/extensions/lsp.vim @@ -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