Skip to content

Commit 9813d5e

Browse files
blueyedjunegunn
authored andcommitted
Display not-loaded status with all plugins that have a dir (#547)
1 parent ddc67fc commit 9813d5e

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

plug.vim

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2246,15 +2246,16 @@ function! s:status()
22462246
let unloaded = 0
22472247
let [cnt, total] = [0, len(g:plugs)]
22482248
for [name, spec] in items(g:plugs)
2249+
let is_dir = isdirectory(spec.dir)
22492250
if has_key(spec, 'uri')
2250-
if isdirectory(spec.dir)
2251+
if is_dir
22512252
let [err, _] = s:git_validate(spec, 1)
22522253
let [valid, msg] = [empty(err), empty(err) ? 'OK' : err]
22532254
else
22542255
let [valid, msg] = [0, 'Not found. Try PlugInstall.']
22552256
endif
22562257
else
2257-
if isdirectory(spec.dir)
2258+
if is_dir
22582259
let [valid, msg] = [1, 'OK']
22592260
else
22602261
let [valid, msg] = [0, 'Not found.']
@@ -2263,7 +2264,7 @@ function! s:status()
22632264
let cnt += 1
22642265
let ecnt += !valid
22652266
" `s:loaded` entry can be missing if PlugUpgraded
2266-
if valid && get(s:loaded, name, -1) == 0
2267+
if is_dir && get(s:loaded, name, -1) == 0
22672268
let unloaded = 1
22682269
let msg .= ' (not loaded)'
22692270
endif

0 commit comments

Comments
 (0)