mirror of
https://github.com/vim-airline/vim-airline.git
synced 2025-12-06 12:14:24 +08:00
Add bang to function definitions
This makes it easier to reload the files, e.g. via vim-scriptease's `:Runtime`.
This commit is contained in:
@@ -40,7 +40,7 @@ endfunction
|
||||
" deactivate it, until this is properly fixed:
|
||||
" https://groups.google.com/d/msg/vim_dev/sb1jmVirXPU/mPhvDnZ-CwAJ
|
||||
if s:section_use_groups && (v:version >= 704 || (v:version >= 703 && has('patch81')))
|
||||
function s:add_section(builder, context, key)
|
||||
function! s:add_section(builder, context, key)
|
||||
" i have no idea why the warning section needs special treatment, but it's
|
||||
" needed to prevent separators from showing up
|
||||
if ((a:key == 'error' || a:key == 'warning') && empty(s:get_section(a:context.winnr, a:key)))
|
||||
@@ -56,7 +56,7 @@ if s:section_use_groups && (v:version >= 704 || (v:version >= 703 && has('patch8
|
||||
endfunction
|
||||
else
|
||||
" older version don't like the use of %(%)
|
||||
function s:add_section(builder, context, key)
|
||||
function! s:add_section(builder, context, key)
|
||||
if ((a:key == 'error' || a:key == 'warning') && empty(s:get_section(a:context.winnr, a:key)))
|
||||
return
|
||||
endif
|
||||
|
||||
Reference in New Issue
Block a user