mirror of
https://github.com/macvim-dev/macvim.git
synced 2026-06-11 15:37:29 +02:00
runtime(vim9): Reset pwsh and powershell in Open()
relates: #17995 closes: #18986 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
d57b4a3681
commit
3255b8a556
Vendored
+5
@@ -126,6 +126,11 @@ export def Open(file: string)
|
||||
&shellslash = false
|
||||
defer setbufvar('%', '&shellslash', true)
|
||||
endif
|
||||
if &shell == 'pwsh' || &shell == 'powershell'
|
||||
const shell = &shell
|
||||
setlocal shell&
|
||||
defer setbufvar('%', '&shell', shell)
|
||||
endif
|
||||
Launch($"{Viewer()} {shellescape(file, 1)}")
|
||||
enddef
|
||||
|
||||
|
||||
Reference in New Issue
Block a user