File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
src/vs/workbench/contrib/terminal/browser/media Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,9 @@ $Global:__LastHistoryId = -1
21
21
$Nonce = $env: VSCODE_NONCE
22
22
$env: VSCODE_NONCE = $null
23
23
24
+ $osVersion = [System.Environment ]::OSVersion.Version
25
+ $isWindows10 = $IsWindows10 -and $osVersion.Major -eq 10 -and $osVersion.Minor -eq 0 -and $osVersion.Build -lt 22000
26
+
24
27
if ($env: VSCODE_ENV_REPLACE ) {
25
28
$Split = $env: VSCODE_ENV_REPLACE.Split (" :" )
26
29
foreach ($Item in $Split ) {
@@ -105,9 +108,12 @@ if (Get-Module -Name PSReadLine) {
105
108
# OSC 633 ; E ; <CommandLine?> ; <Nonce?> ST
106
109
$Result = " $ ( [char ]0x1b ) ]633;E;"
107
110
$Result += $ (__VSCode- Escape- Value $CommandLine )
108
- $Result += " ;$Nonce "
111
+ # Only send the nonce if the OS is not Windows 10 as it seems to echo to the terminal
112
+ # sometimes
113
+ if ($IsWindows10 -eq $false ) {
114
+ $Result += " ;$Nonce "
115
+ }
109
116
$Result += " `a "
110
- [Console ]::Write($Result )
111
117
112
118
# Command executed
113
119
# OSC 633 ; C ST
You can’t perform that action at this time.
0 commit comments