mirror of
https://github.com/vim/vim.git
synced 2025-09-04 21:33:48 -04:00
runtime(netrw): fix s:NetrwHome() regression
If $MYVIMDIR is unset netrw creates a directory called '$MYVIMDIR' in the current directory fixes: #16609 Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
parent
44c1c04ddb
commit
ee1a24b21d
@ -5299,10 +5299,12 @@ endfun
|
||||
function! s:NetrwHome()
|
||||
if has('nvim')
|
||||
let home = netrw#own#PathJoin(stdpath('state'), 'netrw')
|
||||
elseif exists("g:netrw_home")
|
||||
elseif exists('g:netrw_home')
|
||||
let home = expand(g:netrw_home)
|
||||
elseif exists('$MYVIMDIR')
|
||||
let home = expand('$MYVIMDIR')->substitute('/$', '', '')
|
||||
else
|
||||
let home = expand("$MYVIMDIR")->substitute("/$", "", "")
|
||||
let home = netrw#own#PathJoin(expand('~'), '.vim')
|
||||
endif
|
||||
|
||||
" insure that the home directory exists
|
||||
|
Loading…
x
Reference in New Issue
Block a user