From 8b3aa1632c08784928458b2b85faf5c89feefccf Mon Sep 17 00:00:00 2001 From: itchyny Date: Tue, 20 Aug 2019 14:00:58 +0900 Subject: [PATCH] fix lightline#update for popup specified in the completeopt option --- autoload/lightline.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/autoload/lightline.vim b/autoload/lightline.vim index a3de485..127622c 100644 --- a/autoload/lightline.vim +++ b/autoload/lightline.vim @@ -2,7 +2,7 @@ " Filename: autoload/lightline.vim " Author: itchyny " License: MIT License -" Last Change: 2019/07/30 12:00:00. +" Last Change: 2019/08/20 14:00:00. " ============================================================================= let s:save_cpo = &cpo @@ -21,7 +21,7 @@ function! lightline#update() abort return endif let w = winnr() - let s = winnr('$') == 1 ? [lightline#statusline(0)] : [lightline#statusline(0), lightline#statusline(1)] + let s = winnr('$') == 1 && w > 0 ? [lightline#statusline(0)] : [lightline#statusline(0), lightline#statusline(1)] for n in range(1, winnr('$')) call setwinvar(n, '&statusline', s[n!=w]) call setwinvar(n, 'lightline', n!=w)