check both resolved and unresolved paths (#187).

This commit is contained in:
Bailey Ling 2013-08-26 15:39:27 +00:00
parent 04e00d6933
commit ccb00be717
1 changed files with 3 additions and 0 deletions

View File

@ -209,7 +209,10 @@ function! airline#extensions#load()
" load all other extensions not part of the default distribution
for file in split(globpath(&rtp, "autoload/airline/extensions/*.vim"), "\n")
" check to see that both the resolved and unresolved paths do not match
" up with the path of the found extension
if stridx(resolve(fnamemodify(file, ':p')), s:script_path) < 0
\ && stridx(fnamemodify(file, ':p'), s:script_path) < 0
let name = fnamemodify(file, ':t:r')
if !get(g:, 'airline#extensions#'.name.'#enabled', 1)
continue