store active tab so it isn't overwritten (#5875)

This commit is contained in:
Anthony Dresser
2019-06-04 12:55:55 -07:00
committed by Karl Burtram
parent 7390dce536
commit 912c80e496

View File

@@ -195,6 +195,7 @@ export class QueryResultsView extends Disposable {
}
private setQueryRunner(runner: QueryRunner) {
const activeTab = this._input.state.activeTab;
if (runner.hasCompleted && !this.hasResults(runner)) {
this.hideResults();
} else {
@@ -261,8 +262,8 @@ export class QueryResultsView extends Disposable {
});
}
}));
if (this.input.state.activeTab) {
this._panelView.showTab(this.input.state.activeTab);
if (activeTab) {
this._panelView.showTab(activeTab);
} else {
this._panelView.showTab(this.resultsTab.identifier); // our default tab is the results view
}