diff --git a/autoload/airline/extensions/bufferline.vim b/autoload/airline/extensions/bufferline.vim index 8ca825f..f2bfbbb 100644 --- a/autoload/airline/extensions/bufferline.vim +++ b/autoload/airline/extensions/bufferline.vim @@ -20,6 +20,10 @@ function! airline#extensions#bufferline#init(ext) let g:bufferline_separator = g:airline_symbols.space endif - call airline#parts#define_raw('file', '%{bufferline#refresh_status()}'.bufferline#get_status_string()) + 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()) + endif endfunction -