runtime(vim9): Disable shellslash for shellescape() in Open()
Commit:
https://github.com/vim/vim/commit/39f9298cb2944071b2b19a6b28edf0939aa4312d
Author: 毛逸宁 <[email protected]>
Date: Sat Aug 16 17:38:33 2025 +0200
runtime(vim9): Disable shellslash for shellescape() in Open()
fixes: https://github.com/vim/vim/issues/17995
closes: https://github.com/vim/vim/issues/18004
Signed-off-by: 毛逸宁 <[email protected]>
Signed-off-by: Christian Brabandt <[email protected]>
diff --git a/runtime/autoload/dist/vim9.vim b/runtime/autoload/dist/vim9.vim
index 6d4079ea3..fa14bdaf0 100644
--- a/runtime/autoload/dist/vim9.vim
+++ b/runtime/autoload/dist/vim9.vim
@@ -3,7 +3,7 @@ vim9script
# Vim runtime support library
#
# Maintainer: The Vim Project <https://github.com/vim/vim>
-# Last Change: 2025 Jan 29
+# Last Change: 2025 Aug 15
export def IsSafeExecutable(filetype: string, executable: string): bool
if empty(exepath(executable))
@@ -121,6 +121,11 @@ def Viewer(): string
enddef
export def Open(file: string)
+ # disable shellslash for shellescape, required on Windows #17995
+ if exists('+shellslash') && &shellslash
+ &shellslash = false
+ defer setbufvar('%', '&shellslash', true)
+ endif
Launch($"{Viewer()} {shellescape(file, 1)}")
enddef
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion visit
https://groups.google.com/d/msgid/vim_dev/E1unJ5d-0016Ga-3b%40256bit.org.