提交 4e0b249b 编写于 作者: D Daniel Imms

Only use pwsh paste on PowerShell 6+

Fixes #95169
上级 bcded081
...@@ -153,7 +153,7 @@ if (BrowserFeatures.clipboard.readText) { ...@@ -153,7 +153,7 @@ if (BrowserFeatures.clipboard.readText) {
// shell, this gets handled by PSReadLine which properly handles multi-line pastes // shell, this gets handled by PSReadLine which properly handles multi-line pastes
if (platform.isWindows) { if (platform.isWindows) {
registerSendSequenceKeybinding(String.fromCharCode('V'.charCodeAt(0) - 64), { // ctrl+v registerSendSequenceKeybinding(String.fromCharCode('V'.charCodeAt(0) - 64), { // ctrl+v
when: ContextKeyExpr.and(KEYBINDING_CONTEXT_TERMINAL_FOCUS, ContextKeyExpr.equals(KEYBINDING_CONTEXT_TERMINAL_SHELL_TYPE_KEY, WindowsShellType.PowerShell)), when: ContextKeyExpr.and(KEYBINDING_CONTEXT_TERMINAL_FOCUS, ContextKeyExpr.equals(KEYBINDING_CONTEXT_TERMINAL_SHELL_TYPE_KEY, WindowsShellType.Pwsh)),
primary: KeyMod.CtrlCmd | KeyCode.KEY_V primary: KeyMod.CtrlCmd | KeyCode.KEY_V
}); });
} }
......
...@@ -188,7 +188,8 @@ export interface ISearchOptions { ...@@ -188,7 +188,8 @@ export interface ISearchOptions {
export enum WindowsShellType { export enum WindowsShellType {
CommandPrompt = 'cmd', CommandPrompt = 'cmd',
PowerShell = 'pwsh', PowerShell = 'powershell',
Pwsh = 'pwsh',
Wsl = 'wsl', Wsl = 'wsl',
GitBash = 'gitbash' GitBash = 'gitbash'
} }
......
...@@ -151,8 +151,9 @@ export class WindowsShellHelper extends Disposable implements IWindowsShellHelpe ...@@ -151,8 +151,9 @@ export class WindowsShellHelper extends Disposable implements IWindowsShellHelpe
case 'cmd.exe': case 'cmd.exe':
return WindowsShellType.CommandPrompt; return WindowsShellType.CommandPrompt;
case 'powershell.exe': case 'powershell.exe':
case 'pwsh.exe':
return WindowsShellType.PowerShell; return WindowsShellType.PowerShell;
case 'pwsh.exe':
return WindowsShellType.Pwsh;
case 'bash.exe': case 'bash.exe':
return WindowsShellType.GitBash; return WindowsShellType.GitBash;
case 'wsl.exe': case 'wsl.exe':
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册