diff --git a/autoload/airline/extensions/fern.vim b/autoload/airline/extensions/fern.vim index a130cdd8..95b0ae0d 100644 --- a/autoload/airline/extensions/fern.vim +++ b/autoload/airline/extensions/fern.vim @@ -27,7 +27,11 @@ endfunction function! airline#extensions#fern#configure_sections(win, context) abort let spc = g:airline_symbols.space let fri = fern#fri#parse(bufname(a:context.bufnr)) - let abspath = fern#fri#to#filepath(fern#fri#parse(fri.path)) + let abspath = '' + " Replace uses fern-replacer filetype, do not try to parse in that case + if &ft ==# 'fern' && fri.scheme ==# 'fern' + let abspath = fern#fri#to#filepath(fern#fri#parse(fri.path)) + endif call a:win.add_section('airline_a', spc.'fern'.spc) if exists('*airline#extensions#branch#get_head') " because fern navigation changes an internal _fri_ and not the working directory