File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
Expand file tree Collapse file tree 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 {
358358
359359 private pickPSHostProcess ( ) : Thenable < string > {
360360 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+ } ] ;
362367
363368 for ( const p in hostProcesses ) {
364369 if ( hostProcesses . hasOwnProperty ( p ) ) {
@@ -487,7 +492,8 @@ export class PickRunspaceFeature implements IFeature {
487492
488493 for ( const runspace of response ) {
489494 // Skip default runspace
490- if ( runspace . id === 1 || runspace . name === "PSAttachRunspace" ) {
495+ if ( ( runspace . id === 1 || runspace . name === "PSAttachRunspace" )
496+ && processId === "current" ) {
491497 continue ;
492498 }
493499
You can’t perform that action at this time.
0 commit comments