diff --git a/src/ZenViewSplitter.mjs b/src/ZenViewSplitter.mjs index d0782a3..30a650a 100644 --- a/src/ZenViewSplitter.mjs +++ b/src/ZenViewSplitter.mjs @@ -85,7 +85,10 @@ var gZenViewSplitter = new (class { */ removeGroup(groupIndex) { if (this.currentView === groupIndex) { - this.resetSplitView(); + this.resetSplitView(false); + } + for (const tab of this._data[groupIndex].tabs) { + this.resetTabState(tab, true); } this._data.splice(groupIndex, 1); } @@ -93,9 +96,11 @@ var gZenViewSplitter = new (class { /** * Resets the split view. */ - resetSplitView() { - for (const tab of this._data[this.currentView].tabs) { - this.resetTabState(tab, true); + resetSplitView(resetTabState = true) { + if (resetTabState) { + for (const tab of this._data[this.currentView].tabs) { + this.resetTabState(tab, true); + } } this.removeSplitters(); diff --git a/src/ZenWorkspaces.mjs b/src/ZenWorkspaces.mjs index 4952f57..364db3f 100644 --- a/src/ZenWorkspaces.mjs +++ b/src/ZenWorkspaces.mjs @@ -579,10 +579,6 @@ var ZenWorkspaces = { let firstTab = undefined; let workspaces = await this._workspaces(); for (let workspace of workspaces.workspaces) { - if (workspace.uuid === window.uuid && workspace.used) { - // If the workspace is already active, do nothing - return; - } workspace.used = workspace.uuid === window.uuid; } await this.unsafeSaveWorkspaces(workspaces);