mirror of
https://github.com/junegunn/vim-plug.git
synced 2024-12-19 10:35:38 -07:00
Display not-loaded status with all plugins that have a dir (#547)
This commit is contained in:
parent
ddc67fc136
commit
9813d5ead5
7
plug.vim
7
plug.vim
@ -2246,15 +2246,16 @@ function! s:status()
|
|||||||
let unloaded = 0
|
let unloaded = 0
|
||||||
let [cnt, total] = [0, len(g:plugs)]
|
let [cnt, total] = [0, len(g:plugs)]
|
||||||
for [name, spec] in items(g:plugs)
|
for [name, spec] in items(g:plugs)
|
||||||
|
let is_dir = isdirectory(spec.dir)
|
||||||
if has_key(spec, 'uri')
|
if has_key(spec, 'uri')
|
||||||
if isdirectory(spec.dir)
|
if is_dir
|
||||||
let [err, _] = s:git_validate(spec, 1)
|
let [err, _] = s:git_validate(spec, 1)
|
||||||
let [valid, msg] = [empty(err), empty(err) ? 'OK' : err]
|
let [valid, msg] = [empty(err), empty(err) ? 'OK' : err]
|
||||||
else
|
else
|
||||||
let [valid, msg] = [0, 'Not found. Try PlugInstall.']
|
let [valid, msg] = [0, 'Not found. Try PlugInstall.']
|
||||||
endif
|
endif
|
||||||
else
|
else
|
||||||
if isdirectory(spec.dir)
|
if is_dir
|
||||||
let [valid, msg] = [1, 'OK']
|
let [valid, msg] = [1, 'OK']
|
||||||
else
|
else
|
||||||
let [valid, msg] = [0, 'Not found.']
|
let [valid, msg] = [0, 'Not found.']
|
||||||
@ -2263,7 +2264,7 @@ function! s:status()
|
|||||||
let cnt += 1
|
let cnt += 1
|
||||||
let ecnt += !valid
|
let ecnt += !valid
|
||||||
" `s:loaded` entry can be missing if PlugUpgraded
|
" `s:loaded` entry can be missing if PlugUpgraded
|
||||||
if valid && get(s:loaded, name, -1) == 0
|
if is_dir && get(s:loaded, name, -1) == 0
|
||||||
let unloaded = 1
|
let unloaded = 1
|
||||||
let msg .= ' (not loaded)'
|
let msg .= ' (not loaded)'
|
||||||
endif
|
endif
|
||||||
|
Loading…
Reference in New Issue
Block a user