File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
src/vs/workbench/contrib/terminal/common/scripts Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -88,7 +88,7 @@ function Global:Prompt() {
88
88
$Result = " "
89
89
# Skip finishing the command if the first command has not yet started or an execution has not
90
90
# yet begun
91
- if ($Global :__VSCodeState.LastHistoryId -ne -1 -and $Global :__VSCodeState.IsInExecution -eq $true ) {
91
+ if ($Global :__VSCodeState.LastHistoryId -ne -1 -and ( $Global :__VSCodeState.HasPSReadLine -eq $false -or $ Global :__VSCodeState . IsInExecution -eq $true ) ) {
92
92
$Global :__VSCodeState.IsInExecution = $false
93
93
if ($LastHistoryEntry.Id -eq $Global :__VSCodeState.LastHistoryId ) {
94
94
# Don't provide a command line or exit code if there was no history entry (eg. ctrl+c, enter on no command)
@@ -153,7 +153,9 @@ elseif ((Test-Path variable:global:GitPromptSettings) -and $Global:GitPromptSett
153
153
154
154
# Only send the command executed sequence when PSReadLine is loaded, if not shell integration should
155
155
# still work thanks to the command line sequence
156
+ $Global :__VSCodeState.HasPSReadLine = $false
156
157
if (Get-Module - Name PSReadLine) {
158
+ $Global :__VSCodeState.HasPSReadLine = $true
157
159
[Console ]::Write(" $ ( [char ]0x1b ) ]633;P;HasRichCommandDetection=True`a " )
158
160
159
161
$Global :__VSCodeState.OriginalPSConsoleHostReadLine = $function: PSConsoleHostReadLine
You can’t perform that action at this time.
0 commit comments