Skip to content

Commit

Permalink
Merge remote-tracking branch 'chrisbra/master'
Browse files Browse the repository at this point in the history
Prevent error when g:airline_section_x is undefined.
Fixes vim-airline/vim-airline#1627:
vim-airline/vim-airline#1627
  • Loading branch information
slabua committed Jan 14, 2018
2 parents 009d24e + 0cc8062 commit fb6fe4d
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 @@ -694,7 +694,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 fb6fe4d

Please sign in to comment.