mirror of
https://github.com/vim-airline/vim-airline.git
synced 2025-12-10 22:11:51 +08:00
bufferline: take 'acd' into account
vim-airline does use a different section (path/file) depending on whether 'acd' is set. Later in the bufferline extesion however, it unconditionally overwrites the 'file' section, regardless of whether this section is actually used. Therefore the bufferline section needs to check this option as well. fixes #1487
This commit is contained in:
@@ -20,6 +20,10 @@ function! airline#extensions#bufferline#init(ext)
|
|||||||
let g:bufferline_separator = g:airline_symbols.space
|
let g:bufferline_separator = g:airline_symbols.space
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
if exists("+autochdir") && &autochdir == 1
|
||||||
|
" if 'acd' is set, vim-airline uses the path section, so we need ot redefine this here as well
|
||||||
|
call airline#parts#define_raw('path', '%{bufferline#refresh_status()}'.bufferline#get_status_string())
|
||||||
|
else
|
||||||
call airline#parts#define_raw('file', '%{bufferline#refresh_status()}'.bufferline#get_status_string())
|
call airline#parts#define_raw('file', '%{bufferline#refresh_status()}'.bufferline#get_status_string())
|
||||||
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user