summaryrefslogtreecommitdiffstats
path: root/runtime/autoload
diff options
context:
space:
mode:
authorChristian Brabandt <cb@256bit.org>2023-12-14 20:09:07 +0100
committerGitHub <noreply@github.com>2023-12-14 20:09:07 +0100
commit9a775b4a2ae658e61f9d6582de72ea7a1b241aaa (patch)
treed5e8f41fa904fe0c1d9f17ccf09d6e7fd9ca1b9e /runtime/autoload
parentfa831102c38c9192edf3aaf0cbcaff9ee5e006ac (diff)
runtime(netrw): escape curdir in BrowseUpDir (#13681)
fixes #13678 Signed-off-by: Christian Brabandt <cb@256bit.org>
Diffstat (limited to 'runtime/autoload')
-rw-r--r--runtime/autoload/netrw.vim3
1 files changed, 2 insertions, 1 deletions
diff --git a/runtime/autoload/netrw.vim b/runtime/autoload/netrw.vim
index db66f5d851..d22e59d36c 100644
--- a/runtime/autoload/netrw.vim
+++ b/runtime/autoload/netrw.vim
@@ -5315,7 +5315,8 @@ fun! s:NetrwBrowseUpDir(islocal)
endif
call s:RestorePosn(s:netrw_posn)
let curdir= substitute(curdir,'^.*[\/]','','')
- call search('\<'.curdir.'/','wc')
+ let curdir= '\<'. escape(curdir, '~'). '/'
+ call search(curdir,'wc')
endif
" call Dret("s:NetrwBrowseUpDir")
endfun