mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-24 18:49:00 +01:00
Force focus when the terminal panel is already visible
This commit is contained in:
@@ -26,6 +26,10 @@ export class MainThreadTerminalService extends MainThreadTerminalServiceShape {
|
||||
public $show(terminalId: number, preserveFocus: boolean): void {
|
||||
this._terminalService.show(!preserveFocus).then((terminalPanel) => {
|
||||
this._terminalService.setActiveTerminalById(terminalId);
|
||||
if (!preserveFocus) {
|
||||
// If the panel was already showing an explicit focus call is necessary here.
|
||||
terminalPanel.focus();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user