mirror of
https://github.com/vim-airline/vim-airline.git
synced 2025-12-06 20:24:27 +08:00
fern: handle cases when scheme is not fern of filetype is fern-
Some checks failed
CI / Test (v7.4) (push) Has been cancelled
CI / Test (v8.0.0000) (push) Has been cancelled
CI / Test (v8.1.0000) (push) Has been cancelled
CI / Test (v8.2.0000) (push) Has been cancelled
CI / Test (v8.2.1000) (push) Has been cancelled
CI / Test (v9.0.0000) (push) Has been cancelled
CI / Test (v9.1.0000) (push) Has been cancelled
reviewdog / runner / vint (push) Has been cancelled
Some checks failed
CI / Test (v7.4) (push) Has been cancelled
CI / Test (v8.0.0000) (push) Has been cancelled
CI / Test (v8.1.0000) (push) Has been cancelled
CI / Test (v8.2.0000) (push) Has been cancelled
CI / Test (v8.2.1000) (push) Has been cancelled
CI / Test (v9.0.0000) (push) Has been cancelled
CI / Test (v9.1.0000) (push) Has been cancelled
reviewdog / runner / vint (push) Has been cancelled
closes: #2735 Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user