提交 def249e5 编写于 作者: D Daniel Imms

Only refocus after removing tab if the tab had focus

上级 233c706b
......@@ -112,10 +112,10 @@ export abstract class TerminalService implements ITerminalService {
// Adjust focus if the tab was active
if (wasActiveTab && this._terminalTabs.length > 0) {
const hasFocusOnExit = tab.activeInstance.hadFocusOnExit;
let newIndex = index < this._terminalTabs.length ? index : this._terminalTabs.length - 1;
this.setActiveInstanceByIndex(newIndex);
// TODO: Needs to be made to work with multiple instances in a tab
if (tab.terminalInstances[0].hadFocusOnExit) {
if (hasFocusOnExit) {
this.getActiveInstance().focus(true);
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册