mirror of
https://github.com/vim-airline/vim-airline-themes.git
synced 2026-10-11 23:50:21 +08:00
deprecate airline_readonly_symbol. move into gutter by default, so it does not conflict with bufferline logic.
This commit is contained in:
1 parent
fad2c084e7
commit
e2a758e309
3 files changed
+8
-5
No files matched your search
@@ -1,11 +1,15 @@
|
||||
" MIT License. Copyright (c) 2013 Bailey Ling.
|
||||
" 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'))
|
||||
|
||||
function! airline#extensions#readonly#get_mark()
|
||||
return &ro ? g:airline_readonly_symbol : ''
|
||||
return &ro ? s:symbol : ''
|
||||
endfunction
|
||||
|
||||
function! airline#extensions#readonly#init()
|
||||
let g:airline_section_c .= '%{airline#extensions#readonly#get_mark()}'
|
||||
let g:airline_section_gutter = '%{airline#extensions#readonly#get_mark()}'
|
||||
\ .g:airline_section_gutter
|
||||
endfunction
|
||||
|
||||
Reference in new issue
Block a user