mirror of
https://github.com/vim-airline/vim-airline.git
synced 2024-11-23 06:47:28 +08:00
Merge pull request #172 from mattn/check_loadable
Don't use name 'vim-airline' to check loadable extensions.
This commit is contained in:
commit
fa3cd0fdc1
|
@ -10,6 +10,8 @@ function! s:ext.add_cursormove_funcref(funcref) dict
|
||||||
call add(self._cursormove_funcrefs, a:funcref)
|
call add(self._cursormove_funcrefs, a:funcref)
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
let s:script_path = expand('<sfile>:p:h')
|
||||||
|
|
||||||
let s:filetype_overrides = {
|
let s:filetype_overrides = {
|
||||||
\ 'netrw': [ 'netrw', '%f' ],
|
\ 'netrw': [ 'netrw', '%f' ],
|
||||||
\ 'unite': [ 'Unite', '%{unite#get_status_string()}' ],
|
\ 'unite': [ 'Unite', '%{unite#get_status_string()}' ],
|
||||||
|
@ -183,7 +185,7 @@ function! airline#extensions#load()
|
||||||
|
|
||||||
" load all other extensions not part of the default distribution
|
" load all other extensions not part of the default distribution
|
||||||
for file in split(globpath(&rtp, "autoload/airline/extensions/*.vim"), '\n')
|
for file in split(globpath(&rtp, "autoload/airline/extensions/*.vim"), '\n')
|
||||||
if match(fnamemodify(file, ':p'), '\vvim-airline(/|\\)autoload') < 0
|
if stridx(fnamemodify(file, ':p'), s:script_path) < 0
|
||||||
let name = fnamemodify(file, ':t:r')
|
let name = fnamemodify(file, ':t:r')
|
||||||
if !get(g:, 'airline#extensions#'.name.'#enabled', 1)
|
if !get(g:, 'airline#extensions#'.name.'#enabled', 1)
|
||||||
continue
|
continue
|
||||||
|
|
Loading…
Reference in New Issue
Block a user