mirror of
https://github.com/vim-airline/vim-airline.git
synced 2025-07-25 23:14:50 +02:00
fern: use correct API to parse the fern protocol
related: #2717 Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
parent
0694335daa
commit
45003f9451
@ -27,11 +27,7 @@ endfunction
|
|||||||
function! airline#extensions#fern#configure_sections(win, context) abort
|
function! airline#extensions#fern#configure_sections(win, context) abort
|
||||||
let spc = g:airline_symbols.space
|
let spc = g:airline_symbols.space
|
||||||
let fri = fern#fri#parse(bufname(a:context.bufnr))
|
let fri = fern#fri#parse(bufname(a:context.bufnr))
|
||||||
let abspath = fri.path
|
let abspath = fern#fri#to#filepath(fern#fri#parse(fri.path))
|
||||||
if fri.path =~ '%\d\d'
|
|
||||||
let abspath = fern#fri#decode(fern#fri#decode(fri.path))
|
|
||||||
endif
|
|
||||||
let abspath = substitute(abspath, 'file://', '', '')
|
|
||||||
call a:win.add_section('airline_a', spc.'fern'.spc)
|
call a:win.add_section('airline_a', spc.'fern'.spc)
|
||||||
if exists('*airline#extensions#branch#get_head')
|
if exists('*airline#extensions#branch#get_head')
|
||||||
" because fern navigation changes an internal _fri_ and not the working directory
|
" because fern navigation changes an internal _fri_ and not the working directory
|
||||||
|
Loading…
x
Reference in New Issue
Block a user