From abbbe914f0df12e757e8215bdab9fc278778ef2a Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Sat, 29 Oct 2016 04:46:33 +0900 Subject: [PATCH] Remove unnecessary operations --- plug.vim | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/plug.vim b/plug.vim index 3144144..4a1a57b 100644 --- a/plug.vim +++ b/plug.vim @@ -401,7 +401,7 @@ function! s:reorg_rtp() let s:middle = get(s:, 'middle', &rtp) let rtps = map(s:loaded_names(), 's:rtp(g:plugs[v:val])') - let afters = filter(map(copy(rtps), 'globpath(v:val, "after")'), 'isdirectory(v:val)') + let afters = filter(map(copy(rtps), 'globpath(v:val, "after")'), '!empty(v:val)') let rtp = join(map(rtps, 'escape(v:val, ",")'), ',') \ . ','.s:middle.',' \ . join(map(afters, 'escape(v:val, ",")'), ',') @@ -576,8 +576,7 @@ function! s:infer_properties(name, repo) let fmt = get(g:, 'plug_url_format', 'https://git::@github.com/%s.git') let uri = printf(fmt, repo) endif - let dir = s:dirpath( fnamemodify(join([g:plug_home, a:name], '/'), ':p') ) - return { 'dir': dir, 'uri': uri } + return { 'dir': s:dirpath(g:plug_home.'/'.a:name), 'uri': uri } endif endfunction