提交 2b717c65 编写于 作者: D Daniel Imms

Fix terminal focus after opening via cmd palette

上级 e0d8548f
......@@ -189,13 +189,17 @@ export abstract class TerminalService implements ITerminalService {
if (!panel || panel.getId() !== TERMINAL_PANEL_ID) {
return this._panelService.openPanel(TERMINAL_PANEL_ID, focus).then(() => {
if (focus) {
this.getActiveInstance().focus(true);
// Do the focus call asynchronously as going through the
// command palette will force editor focus
setTimeout(() => this.getActiveInstance().focus(true), 0);
}
complete(void 0);
});
} else {
if (focus) {
this.getActiveInstance().focus(true);
// Do the focus call asynchronously as going through the
// command palette will force editor focus
setTimeout(() => this.getActiveInstance().focus(true), 0);
}
complete(void 0);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册