mirror of
https://github.com/vim-airline/vim-airline.git
synced 2026-05-18 06:19:42 +08:00
vim-dirvish: Fixed bugs and added better include guards
Fixes issue #2142. These changes primarily focused on making the include guards more robust and simplify how the path for w:airline_section_c was generated. Credits goes to @kazukazuinaina for improving on my original implementation.
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
|
||||
scriptencoding utf-8
|
||||
|
||||
if !exists(':Dirvish')
|
||||
if !get(g:, 'loaded_dirvish', 0)
|
||||
finish
|
||||
endif
|
||||
|
||||
@@ -22,10 +22,7 @@ function! airline#extensions#dirvish#apply(...) abort
|
||||
\ ? '%{airline#extensions#branch#get_head()}'
|
||||
\ : ''
|
||||
|
||||
let w:airline_section_c =
|
||||
\ '%{join(split((execute("lcd"))))}'
|
||||
\ . s:spc
|
||||
\ . get(w:, 'airline_section_c', g:airline_section_c)
|
||||
let w:airline_section_c = '%{b:dirvish._dir}'
|
||||
|
||||
let w:airline_section_x = ''
|
||||
let w:airline_section_y = ''
|
||||
|
||||
Reference in New Issue
Block a user