mirror of
https://github.com/junegunn/vim-plug.git
synced 2025-12-06 09:04:23 +08:00
Strip trailing slash from g:plug_home
This commit is contained in:
5
plug.vim
5
plug.vim
@@ -58,8 +58,9 @@ let s:is_win = has('win32') || has('win64')
|
||||
let s:me = expand('<sfile>:p')
|
||||
|
||||
function! plug#begin(...)
|
||||
let home = a:0 > 0 ? fnamemodify(a:1, ':p') :
|
||||
\ get(g:, 'plug_home', split(&rtp, ',')[0].'/plugged')
|
||||
let home = s:path(
|
||||
\ a:0 > 0 ? fnamemodify(a:1, ':p') :
|
||||
\ get(g:, 'plug_home', split(&rtp, ',')[0].'/plugged'))
|
||||
if !isdirectory(home)
|
||||
try
|
||||
call mkdir(home, 'p')
|
||||
|
||||
Reference in New Issue
Block a user