From 45003f9451d8038064ffe804cf8e8eb0f6a20210 Mon Sep 17 00:00:00 2001 From: Christian Brabandt Date: Mon, 14 Apr 2025 07:49:27 +0200 Subject: [PATCH] fern: use correct API to parse the fern protocol related: #2717 Signed-off-by: Christian Brabandt --- autoload/airline/extensions/fern.vim | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/autoload/airline/extensions/fern.vim b/autoload/airline/extensions/fern.vim index 51fe55b1..a130cdd8 100644 --- a/autoload/airline/extensions/fern.vim +++ b/autoload/airline/extensions/fern.vim @@ -27,11 +27,7 @@ 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 = fri.path - if fri.path =~ '%\d\d' - let abspath = fern#fri#decode(fern#fri#decode(fri.path)) - endif - let abspath = substitute(abspath, 'file://', '', '') + let abspath = fern#fri#to#filepath(fern#fri#parse(fri.path)) 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