aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-12-16 05:28:57 +0800
committerGitHub <noreply@github.com>2023-12-16 05:28:57 +0800
commit0d26d192d82716a72f5216cafd675a68c6e93580 (patch)
treeb9274c6e530b4e8c4556f11a7c95ef1e62cce371
parent224b2ec20250db8afd7a9232cad9e35b49e253a7 (diff)
downloadrneovim-0d26d192d82716a72f5216cafd675a68c6e93580.tar.gz
rneovim-0d26d192d82716a72f5216cafd675a68c6e93580.tar.bz2
rneovim-0d26d192d82716a72f5216cafd675a68c6e93580.zip
vim-patch:9a775b4a2ae6 (#26588)
runtime(netrw): escape curdir in BrowseUpDir (vim/vim#13681) fixes vim/vim#13678 https://github.com/vim/vim/commit/9a775b4a2ae658e61f9d6582de72ea7a1b241aaa Co-authored-by: Christian Brabandt <cb@256bit.org>
-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 501736542f..30964ae80d 100644
--- a/runtime/autoload/netrw.vim
+++ b/runtime/autoload/netrw.vim
@@ -5268,7 +5268,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