mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
vim-patch:2357765304e4
runtime(netrw): Decode multibyte percent-encoding filename correctly (vim/vim#13842)
Use `printf("%c")` instead of `nr2char()` to handle '%xx' as a byte.
Close vim/vim#13787
2357765304
Co-authored-by: K.Takata <kentkt@csc.jp>
This commit is contained in:
parent
061a0d5a48
commit
7f249936a9
@ -11477,7 +11477,7 @@ endfun
|
|||||||
" netrw#RFC2396: converts %xx into characters {{{2
|
" netrw#RFC2396: converts %xx into characters {{{2
|
||||||
fun! netrw#RFC2396(fname)
|
fun! netrw#RFC2396(fname)
|
||||||
" call Dfunc("netrw#RFC2396(fname<".a:fname.">)")
|
" call Dfunc("netrw#RFC2396(fname<".a:fname.">)")
|
||||||
let fname = escape(substitute(a:fname,'%\(\x\x\)','\=nr2char("0x".submatch(1))','ge')," \t")
|
let fname = escape(substitute(a:fname,'%\(\x\x\)','\=printf("%c","0x".submatch(1))','ge')," \t")
|
||||||
" call Dret("netrw#RFC2396 ".fname)
|
" call Dret("netrw#RFC2396 ".fname)
|
||||||
return fname
|
return fname
|
||||||
endfun
|
endfun
|
||||||
|
Loading…
Reference in New Issue
Block a user