init: section_y includes missing endofline and BOM

This commit is contained in:
Christian Brabandt
2021-01-02 19:25:34 +01:00
parent 5601c0928e
commit 8a60582527
2 changed files with 7 additions and 4 deletions

View File

@@ -107,11 +107,12 @@ endfunction
function! airline#parts#ffenc()
let expected = get(g:, 'airline#parts#ffenc#skip_expected_string', '')
let bomb = &l:bomb ? '[BOM]' : ''
let bomb = &bomb ? '[BOM]' : ''
let noeolf = &eol ? '' : '[!EOL]'
let ff = strlen(&ff) ? '['.&ff.']' : ''
if expected is# &fenc.bomb.ff
if expected is# &fenc.bomb.noeolf.ff
return ''
else
return &fenc.bomb.ff
return &fenc.bomb.noeolf.ff
endif
endfunction