diff options
author | K.Takata <kentkt@csc.jp> | 2024-01-13 01:30:01 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-12 17:30:01 +0100 |
commit | 2357765304e4c55935b5cc853ffb98ae82d64a01 (patch) | |
tree | 7a0b0e92d514f51be3ee1dd1989c946c997e4e83 /runtime/autoload | |
parent | 28d71b566a29ceea3a2d05bcee9264ed5d630d42 (diff) |
runtime(netrw): Decode multibyte percent-encoding filename correctly (#13842)
Use `printf("%c")` instead of `nr2char()` to handle '%xx' as a byte.
Close #13787
Signed-off-by: Ken Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Diffstat (limited to 'runtime/autoload')
-rw-r--r-- | runtime/autoload/netrw.vim | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/runtime/autoload/netrw.vim b/runtime/autoload/netrw.vim index 3af7ba0f1d..bcb1f24751 100644 --- a/runtime/autoload/netrw.vim +++ b/runtime/autoload/netrw.vim @@ -11587,7 +11587,7 @@ endfun " netrw#RFC2396: converts %xx into characters {{{2 fun! netrw#RFC2396(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) return fname endfun |