mirror of
https://github.com/vim-airline/vim-airline-themes
synced 2024-12-12 17:14:52 +00:00
paste mark is now a member of extensions
This commit is contained in:
parent
0068093ea0
commit
20c5c64590
@ -49,8 +49,7 @@ function! airline#get_statusline(winnr, active)
|
|||||||
let builder = airline#builder#new(a:active, s:highlighter)
|
let builder = airline#builder#new(a:active, s:highlighter)
|
||||||
|
|
||||||
if airline#util#getwinvar(a:winnr, 'airline_render_left', a:active || (!a:active && !g:airline_inactive_collapse))
|
if airline#util#getwinvar(a:winnr, 'airline_render_left', a:active || (!a:active && !g:airline_inactive_collapse))
|
||||||
call builder.add_section('airline_a', s:get_section(a:winnr, 'a')
|
call builder.add_section('airline_a', s:get_section(a:winnr, 'a'))
|
||||||
\ .'%{g:airline_detect_paste && &paste ? g:airline_paste_symbol." " : ""}')
|
|
||||||
call builder.add_section('airline_b', s:get_section(a:winnr, 'b'))
|
call builder.add_section('airline_b', s:get_section(a:winnr, 'b'))
|
||||||
call builder.add_section('airline_c', '%<'.s:get_section(a:winnr, 'c'))
|
call builder.add_section('airline_c', '%<'.s:get_section(a:winnr, 'c'))
|
||||||
else
|
else
|
||||||
|
@ -173,6 +173,10 @@ function! airline#extensions#load()
|
|||||||
call airline#extensions#readonly#init()
|
call airline#extensions#readonly#init()
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
if (get(g:, 'airline#extensions#paste#enabled', 1) && get(g:, 'airline_detect_paste', 1))
|
||||||
|
call airline#extensions#paste#init()
|
||||||
|
endif
|
||||||
|
|
||||||
if g:airline_detect_iminsert
|
if g:airline_detect_iminsert
|
||||||
call airline#extensions#iminsert#init()
|
call airline#extensions#iminsert#init()
|
||||||
endif
|
endif
|
||||||
|
14
autoload/airline/extensions/paste.vim
Normal file
14
autoload/airline/extensions/paste.vim
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
" MIT License. Copyright (c) 2013 Bailey Ling.
|
||||||
|
" vim: et ts=2 sts=2 sw=2
|
||||||
|
|
||||||
|
let s:symbol = get(g:, 'airline#extensions#paste#symbol',
|
||||||
|
\ get(g:, 'airline_paste_symbol', ''))
|
||||||
|
|
||||||
|
function! airline#extensions#paste#get_mark()
|
||||||
|
return &paste ? ' ' . s:symbol : ''
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
function! airline#extensions#paste#init()
|
||||||
|
let g:airline_section_a .= '%{airline#extensions#paste#get_mark()}'
|
||||||
|
endfunction
|
||||||
|
|
Loading…
Reference in New Issue
Block a user