mirror of
https://github.com/macvim-dev/macvim.git
synced 2026-06-07 15:37:14 +02:00
runtime(vim9): remove unnecessary temp variable
closes: #20374 Signed-off-by: Mao-Yining <mao.yining@outlook.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
0e8cf80ca1
commit
22a78b5de7
Vendored
+3
-4
@@ -3,7 +3,7 @@ vim9script
|
||||
# Vim runtime support library
|
||||
#
|
||||
# Maintainer: The Vim Project <https://github.com/vim/vim>
|
||||
# Last Change: 2026 May 06
|
||||
# Last Change: 2026 May 30
|
||||
|
||||
export def IsSafeExecutable(filetype: string, executable: string): bool
|
||||
if empty(exepath(executable))
|
||||
@@ -131,13 +131,12 @@ enddef
|
||||
export def Open(file: string)
|
||||
# disable shellslash for shellescape, required on Windows #17995
|
||||
if exists('+shellslash') && &shellslash
|
||||
&shellslash = false
|
||||
defer setbufvar('%', '&shellslash', true)
|
||||
&shellslash = false
|
||||
endif
|
||||
if &shell == 'pwsh' || &shell == 'powershell'
|
||||
const shell = &shell
|
||||
defer setbufvar('%', '&shell', &shell)
|
||||
setlocal shell&
|
||||
defer setbufvar('%', '&shell', shell)
|
||||
endif
|
||||
if has('unix') && !has('win32unix') && !exists('$WSL_DISTRO_NAME')
|
||||
Launch($"{Viewer()} {shellescape(file)}")
|
||||
|
||||
Reference in New Issue
Block a user