From 7cd7972bbed5cdc3ded75fcb453a68f16b803205 Mon Sep 17 00:00:00 2001 From: Christian Brabandt Date: Tue, 13 Dec 2016 20:28:30 +0100 Subject: [PATCH] cleanup unlet calls Instead of looping through the list and unletting each value separately, join the list and their names together and unlet them all together. --- autoload/airline.vim | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/autoload/airline.vim b/autoload/airline.vim index d0b21b0a..23d7fc75 100644 --- a/autoload/airline.vim +++ b/autoload/airline.vim @@ -111,11 +111,8 @@ function! airline#update_statusline() call s:invoke_funcrefs(context, s:inactive_funcrefs) endfor - unlet! w:airline_render_left - unlet! w:airline_render_right - for section in s:sections - unlet! w:airline_section_{section} - endfor + unlet! w:airline_render_left w:airline_render_right + exe 'unlet! ' 'w:airline_section_'. join(s:sections, ' w:airline_section_') let w:airline_active = 1 let context = { 'winnr': winnr(), 'active': 1, 'bufnr': winbufnr(winnr()) } @@ -196,4 +193,3 @@ function! airline#check_mode(winnr) return '' endfunction -