Skip to content

Commit c193ade

Browse files
authored
Merge pull request microsoft#243493 from microsoft/tyriar/243466
Ensure PSReadLine does not activate implicitly
2 parents 2655e1e + f397d79 commit c193ade

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

src/vs/workbench/contrib/terminal/common/scripts/shellIntegration.ps1

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,12 @@ if (Get-Module -Name PSReadLine) {
149149

150150
$CommandLine
151151
}
152+
153+
# Set ContinuationPrompt property
154+
$ContinuationPrompt = (Get-PSReadLineOption).ContinuationPrompt
155+
if ($ContinuationPrompt) {
156+
[Console]::Write("$([char]0x1b)]633;P;ContinuationPrompt=$(__VSCode-Escape-Value $ContinuationPrompt)`a")
157+
}
152158
}
153159

154160
# Set IsWindows property
@@ -160,14 +166,6 @@ else {
160166
[Console]::Write("$([char]0x1b)]633;P;IsWindows=$IsWindows`a")
161167
}
162168

163-
# Set ContinuationPrompt property
164-
if ($isStable -eq "0") {
165-
$ContinuationPrompt = (Get-PSReadLineOption).ContinuationPrompt
166-
if ($ContinuationPrompt) {
167-
[Console]::Write("$([char]0x1b)]633;P;ContinuationPrompt=$(__VSCode-Escape-Value $ContinuationPrompt)`a")
168-
}
169-
}
170-
171169
# Set always on key handlers which map to default VS Code keybindings
172170
function Set-MappedKeyHandler {
173171
param ([string[]] $Chord, [string[]]$Sequence)

0 commit comments

Comments
 (0)