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() {
8888 $Result = " "
8989 # Skip finishing the command if the first command has not yet started or an execution has not
9090 # 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 ) ) {
9292 $Global :__VSCodeState.IsInExecution = $false
9393 if ($LastHistoryEntry.Id -eq $Global :__VSCodeState.LastHistoryId ) {
9494 # 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
153153
154154# Only send the command executed sequence when PSReadLine is loaded, if not shell integration should
155155# still work thanks to the command line sequence
156+ $Global :__VSCodeState.HasPSReadLine = $false
156157if (Get-Module - Name PSReadLine) {
158+ $Global :__VSCodeState.HasPSReadLine = $true
157159 [Console ]::Write(" $ ( [char ]0x1b ) ]633;P;HasRichCommandDetection=True`a " )
158160
159161 $Global :__VSCodeState.OriginalPSConsoleHostReadLine = $function: PSConsoleHostReadLine
You can’t perform that action at this time.
0 commit comments