mirror of
https://github.com/vim-airline/vim-airline.git
synced 2026-02-26 03:27:12 +08:00
Better toggling of powerline fonts
+ Check the value of airline_powerline_fonts not just existence
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
let s:empty_message = get(g:, 'airline#extensions#branch#empty_message',
|
||||
\ get(g:, 'airline_branch_empty_message', ''))
|
||||
let s:symbol = get(g:, 'airline#extensions#branch#symbol',
|
||||
\ get(g:, 'airline_branch_prefix', exists('g:airline_powerline_fonts') ? ' ' : ''))
|
||||
\ get(g:, 'airline_branch_prefix', get(g:, 'airline_powerline_fonts', 0) ? ' ' : ''))
|
||||
|
||||
let s:has_fugitive = exists('*fugitive#head')
|
||||
let s:has_fugitive_detect = exists('*fugitive#detect')
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
" vim: et ts=2 sts=2 sw=2
|
||||
|
||||
let s:symbol = get(g:, 'airline#extensions#paste#symbol',
|
||||
\ get(g:, 'airline_paste_symbol', (exists('g:airline_powerline_fonts') ? ' ' : '').'PASTE'))
|
||||
\ get(g:, 'airline_paste_symbol', (get(g:, 'airline_powerline_fonts', 0) ? ' ' : '').'PASTE'))
|
||||
|
||||
function! airline#extensions#paste#get_mark()
|
||||
return &paste ? ' ' . s:symbol : ''
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
" vim: et ts=2 sts=2 sw=2
|
||||
|
||||
let s:symbol = get(g:, 'airline#extensions#readonly#symbol',
|
||||
\ get(g:, 'airline_readonly_symbol', exists('g:airline_powerline_fonts') ? '' : 'RO'))
|
||||
\ get(g:, 'airline_readonly_symbol', get(g:, 'airline_powerline_fonts', 0) ? '' : 'RO'))
|
||||
|
||||
function! airline#extensions#readonly#get_mark()
|
||||
return &ro ? s:symbol : ''
|
||||
|
||||
@@ -11,7 +11,7 @@ else
|
||||
endif
|
||||
|
||||
let s:symbol = get(g:, 'airline#extensions#whitespace#symbol',
|
||||
\ get(g:, 'airline_whitespace_symbol', exists('g:airline_powerline_fonts') ? '✹' : '!'))
|
||||
\ get(g:, 'airline_whitespace_symbol', get(g:, 'airline_powerline_fonts', 0) ? '✹' : '!'))
|
||||
|
||||
let s:checks = get(g:, 'airline#extensions#whitespace#checks', ['indent', 'trailing'])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user