diff --git a/autoload/airline/extensions/bufferline.vim b/autoload/airline/extensions/bufferline.vim index db2eed8..8df5935 100644 --- a/autoload/airline/extensions/bufferline.vim +++ b/autoload/airline/extensions/bufferline.vim @@ -10,7 +10,5 @@ function! airline#extensions#bufferline#init(ext) let g:bufferline_active_buffer_right = '' let g:bufferline_separator = ' ' - if g:airline_section_c == '%f%m' - let g:airline_section_c = '%{bufferline#refresh_status()}'.bufferline#get_status_string() - endif + let g:airline_parts.file = '%{bufferline#refresh_status()}'.bufferline#get_status_string() endfunction diff --git a/plugin/airline.vim b/plugin/airline.vim index 4a3984e..20c69a2 100644 --- a/plugin/airline.vim +++ b/plugin/airline.vim @@ -44,6 +44,7 @@ call extend(g:airline_parts, { \ 'paste': '%{airline#parts#paste()}', \ 'readonly': '%#airline_file#%{airline#parts#readonly()}', \ 'ffenc': '%{printf("%s%s",&fenc,strlen(&ff)>0?"[".&ff."]":"")}', + \ 'file': '%f%m', \ 'hunks': '', \ 'branch': '', \ }, 'keep') @@ -80,7 +81,7 @@ function! s:init() call airline#extensions#load() call s:check_defined('g:airline_section_a', (g:airline_parts.mode).(g:airline_parts.paste).(g:airline_parts.iminsert)) call s:check_defined('g:airline_section_b', (g:airline_parts.hunks).(g:airline_parts.branch)) - call s:check_defined('g:airline_section_c', '%f%m') + call s:check_defined('g:airline_section_c', (g:airline_parts.file)) call s:check_defined('g:airline_section_gutter', ' '.(g:airline_parts.readonly).'%=') call s:check_defined('g:airline_section_x', '%{&filetype}') call s:check_defined('g:airline_section_y', g:airline_parts.ffenc)