Skip to content

Commit 69c0f1f

Browse files
committed
Don't run shell integration on unsupported LanguageMode
Fixes microsoft#158597
1 parent 866bddc commit 69c0f1f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/vs/workbench/contrib/terminal/browser/media/shellIntegration.ps1

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ if (Test-Path variable:global:__VSCodeOriginalPrompt) {
88
return;
99
}
1010

11+
# Disable shell integration when the language mode is restricted
12+
if (("RestrictedLanguage", "NoLanguage") -Contains $ExecutionContext.SessionState.LanguageMode) {
13+
return;
14+
}
15+
1116
$Global:__VSCodeOriginalPrompt = $function:Prompt
1217

1318
$Global:__LastHistoryId = -1

0 commit comments

Comments
 (0)