Skip to content

Commit

Permalink
prevent error when g:airline_section_x is undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisbra committed Jan 6, 2018
1 parent a3e5022 commit 0cc8062
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion plugin/webdevicons.vim
Original file line number Diff line number Diff line change
Expand Up @@ -683,7 +683,8 @@ endfunction

" scope: public
function! AirlineWebDevIcons(...)
let w:airline_section_x = get(w:, 'airline_section_x', g:airline_section_x)
let w:airline_section_x = get(w:, 'airline_section_x',
\ get(g:, 'airline_section_x', ''))
let w:airline_section_x .= ' %{WebDevIconsGetFileTypeSymbol()} '
let hasFileFormatEncodingPart = airline#parts#ffenc() != ''
if g:webdevicons_enable_airline_statusline_fileformat_symbols && hasFileFormatEncodingPart
Expand Down

0 comments on commit 0cc8062

Please sign in to comment.