File tree 1 file changed +8
-2
lines changed
1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -358,7 +358,12 @@ export class PickPSHostProcessFeature implements IFeature {
358
358
359
359
private pickPSHostProcess ( ) : Thenable < string > {
360
360
return this . languageClient . sendRequest ( GetPSHostProcessesRequestType , null ) . then ( ( hostProcesses ) => {
361
- const items : IProcessItem [ ] = [ ] ;
361
+ // Start with the current PowerShell process in the list.
362
+ const items : IProcessItem [ ] = [ {
363
+ label : "Current" ,
364
+ description : "The current PowerShell Integrated Console process." ,
365
+ pid : "current" ,
366
+ } ] ;
362
367
363
368
for ( const p in hostProcesses ) {
364
369
if ( hostProcesses . hasOwnProperty ( p ) ) {
@@ -487,7 +492,8 @@ export class PickRunspaceFeature implements IFeature {
487
492
488
493
for ( const runspace of response ) {
489
494
// Skip default runspace
490
- if ( runspace . id === 1 || runspace . name === "PSAttachRunspace" ) {
495
+ if ( ( runspace . id === 1 || runspace . name === "PSAttachRunspace" )
496
+ && processId === "current" ) {
491
497
continue ;
492
498
}
493
499
You can’t perform that action at this time.
0 commit comments