File tree Expand file tree Collapse file tree
parts/terminal/electron-browser Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -26,6 +26,10 @@ export class MainThreadTerminalService extends MainThreadTerminalServiceShape {
2626 public $show ( terminalId : number , preserveFocus : boolean ) : void {
2727 this . _terminalService . show ( ! preserveFocus ) . then ( ( terminalPanel ) => {
2828 this . _terminalService . setActiveTerminalById ( terminalId ) ;
29+ if ( ! preserveFocus ) {
30+ // If the panel was already showing an explicit focus call is necessary here.
31+ terminalPanel . focus ( ) ;
32+ }
2933 } ) ;
3034 }
3135
Original file line number Diff line number Diff line change @@ -87,5 +87,6 @@ export interface ITerminalService {
8787
8888export interface ITerminalPanel {
8989 closeTerminalById ( terminalId : number ) : TPromise < void > ;
90+ focus ( ) : void ;
9091 sendTextToActiveTerminal ( text : string , addNewLine : boolean ) : void ;
9192}
Original file line number Diff line number Diff line change @@ -69,7 +69,6 @@ export class TerminalService implements ITerminalService {
6969 return this . show ( false ) . then ( ( terminalPanel ) => {
7070 this . activeTerminalIndex = index ;
7171 terminalPanel . setActiveTerminal ( this . activeTerminalIndex ) ;
72- terminalPanel . focus ( ) ;
7372 this . _onActiveInstanceChanged . fire ( ) ;
7473 } ) ;
7574 }
You can’t perform that action at this time.
0 commit comments