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.
This commit is contained in:
Christian Brabandt 2016-12-13 20:28:30 +01:00
parent dfc0cb772a
commit 7cd7972bbe
1 changed files with 2 additions and 6 deletions

View File

@ -111,11 +111,8 @@ function! airline#update_statusline()
call s:invoke_funcrefs(context, s:inactive_funcrefs) call s:invoke_funcrefs(context, s:inactive_funcrefs)
endfor endfor
unlet! w:airline_render_left unlet! w:airline_render_left w:airline_render_right
unlet! w:airline_render_right exe 'unlet! ' 'w:airline_section_'. join(s:sections, ' w:airline_section_')
for section in s:sections
unlet! w:airline_section_{section}
endfor
let w:airline_active = 1 let w:airline_active = 1
let context = { 'winnr': winnr(), 'active': 1, 'bufnr': winbufnr(winnr()) } let context = { 'winnr': winnr(), 'active': 1, 'bufnr': winbufnr(winnr()) }
@ -196,4 +193,3 @@ function! airline#check_mode(winnr)
return '' return ''
endfunction endfunction