mirror of
https://github.com/vim-airline/vim-airline.git
synced 2025-12-16 00:37:08 +08:00
upgrade all funcrefs to support varargs.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
" MIT License. Copyright (c) 2013 Bailey Ling.
|
||||
" vim: ts=2 sts=2 sw=2 fdm=indent
|
||||
" vim: et ts=2 sts=2 sw=2
|
||||
|
||||
function! airline#extensions#bufferline#apply()
|
||||
function! airline#extensions#bufferline#apply(...)
|
||||
" revert to default in non-active splits
|
||||
for nr in filter(range(1, winnr('$')), 'v:val != winnr()')
|
||||
if matchstr(getwinvar(nr, '&statusline'), '%{bufferline') != ''
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" MIT license. Copyright (c) 2013 Bailey Ling.
|
||||
" vim: ts=2 sts=2 sw=2 fdm=indent
|
||||
" MIT License. Copyright (c) 2013 Bailey Ling.
|
||||
" vim: et ts=2 sts=2 sw=2
|
||||
|
||||
function! airline#extensions#commandt#apply()
|
||||
function! airline#extensions#commandt#apply(...)
|
||||
if bufname('%') ==# 'GoToFile'
|
||||
call airline#extensions#apply_left_override('CommandT', '')
|
||||
endif
|
||||
|
||||
@@ -14,7 +14,7 @@ function! airline#extensions#csv#get_column()
|
||||
return ''
|
||||
endfunction
|
||||
|
||||
function! airline#extensions#csv#apply()
|
||||
function! airline#extensions#csv#apply(...)
|
||||
if &ft ==# "csv"
|
||||
if !exists('w:airline_section_gutter')
|
||||
let w:airline_section_gutter = '%='
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
" MIT license. Copyright (c) 2013 Bailey Ling.
|
||||
" vim: ts=2 sts=2 sw=2 fdm=indent
|
||||
" MIT License. Copyright (c) 2013 Bailey Ling.
|
||||
" vim: et ts=2 sts=2 sw=2
|
||||
|
||||
let s:color_template = get(g:, 'airline#extensions#ctrlp#color_template', 'insert')
|
||||
|
||||
@@ -49,7 +49,7 @@ function! airline#extensions#ctrlp#ctrlp_airline_status(...)
|
||||
return len.dir
|
||||
endfunction
|
||||
|
||||
function! airline#extensions#ctrlp#is_statusline_overwritten()
|
||||
function! airline#extensions#ctrlp#is_statusline_overwritten(...)
|
||||
return match(&statusline, 'CtrlPlight') >= 0
|
||||
endfunction
|
||||
|
||||
@@ -60,3 +60,4 @@ function! airline#extensions#ctrlp#init(ext)
|
||||
\ }
|
||||
call a:ext.add_cursormove_funcref(function('airline#extensions#ctrlp#is_statusline_overwritten'))
|
||||
endfunction
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
" MIT License. Copyright (c) 2013 Bailey Ling.
|
||||
" vim: ts=2 sts=2 sw=2 fdm=indent
|
||||
" vim: et ts=2 sts=2 sw=2
|
||||
|
||||
" Extension specific variables can be defined the usual fashion.
|
||||
if !exists('g:airline#extensions#example#number_of_cats')
|
||||
@@ -23,7 +23,7 @@ function! airline#extensions#example#init(ext)
|
||||
let g:airline_section_y .= '%{airline#extensions#example#nyancat()}'
|
||||
endfunction
|
||||
|
||||
function! airline#extensions#example#apply()
|
||||
function! airline#extensions#example#apply(...)
|
||||
" Here we are checking for the filetype, allowing for the extension to
|
||||
" be loaded only in certain cases.
|
||||
if &filetype == "nyancat"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
" MIT license. Copyright (c) 2013 Bailey Ling.
|
||||
" vim: ts=2 sts=2 sw=2 fdm=indent
|
||||
" MIT License. Copyright (c) 2013 Bailey Ling.
|
||||
" vim: et ts=2 sts=2 sw=2
|
||||
|
||||
function! airline#extensions#iminsert#get_text()
|
||||
if &iminsert
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
" MIT License. Copyright (c) 2013 Bailey Ling.
|
||||
" vim: et ts=2 sts=2 sw=2
|
||||
|
||||
function! airline#extensions#syntastic#apply()
|
||||
function! airline#extensions#syntastic#apply(...)
|
||||
let w:airline_section_warning = get(w:, 'airline_section_warning', '')
|
||||
let w:airline_section_warning = ' %{SyntasticStatuslineFlag()}'
|
||||
endfunction
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" MIT License. Copyright (c) 2013 Bailey Ling.
|
||||
" vim: ts=2 sts=2 sw=2 fdm=indent
|
||||
" vim: et ts=2 sts=2 sw=2
|
||||
|
||||
function! airline#extensions#tagbar#apply()
|
||||
function! airline#extensions#tagbar#apply(...)
|
||||
if &ft == 'tagbar'
|
||||
call airline#extensions#apply_left_override('Tagbar', '%{TagbarGenerateStatusline()}')
|
||||
endif
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" MIT License. Copyright (c) 2013 Bailey Ling.
|
||||
" vim: et ts=2 sts=2 sw=2
|
||||
|
||||
function! airline#extensions#undotree#apply()
|
||||
function! airline#extensions#undotree#apply(...)
|
||||
if exists('t:undotree')
|
||||
if &ft == 'undotree' && exists('*t:undotree.GetStatusLine')
|
||||
call airline#extensions#apply_left_override('undo', '%{t:undotree.GetStatusLine()}')
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
" MIT License. Copyright (c) 2013 Bailey Ling.
|
||||
" vim: ts=2 sts=2 sw=2 fdm=indent
|
||||
" vim: et ts=2 sts=2 sw=2
|
||||
|
||||
" http://got-ravings.blogspot.com/2008/10/vim-pr0n-statusline-whitespace-flags.html
|
||||
|
||||
@@ -53,7 +53,7 @@ function! airline#extensions#whitespace#check()
|
||||
return b:airline_whitespace_check
|
||||
endfunction!
|
||||
|
||||
function! airline#extensions#whitespace#apply()
|
||||
function! airline#extensions#whitespace#apply(...)
|
||||
if !exists('w:airline_section_warning')
|
||||
let w:airline_section_warning = ' '
|
||||
endif
|
||||
@@ -70,10 +70,10 @@ function! airline#extensions#whitespace#toggle()
|
||||
endif
|
||||
endfunction
|
||||
|
||||
function! airline#extensions#whitespace#init()
|
||||
function! airline#extensions#whitespace#init(ext)
|
||||
if !s:initialized
|
||||
let s:initialized = 1
|
||||
call add(g:airline_statusline_funcrefs, function('airline#extensions#whitespace#apply'))
|
||||
call a:ext.add_statusline_funcref(function('airline#extensions#whitespace#apply'))
|
||||
endif
|
||||
|
||||
unlet! b:airline_whitespace_check
|
||||
|
||||
Reference in New Issue
Block a user