Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions apps/desktop/src/renderer/stores/tabs/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -756,9 +756,7 @@ export const useTabsStore = create<TabsStore>()(

const tabPaneIds = extractPaneIdsFromLayout(activeTab.layout);
const reuseExisting = options.reuseExisting ?? "workspace";
const canReuseExistingPane =
!options.openInNewTab && reuseExisting !== "none";
const existingFileViewerPane = canReuseExistingPane
const existingFileViewerPane = reuseExisting !== "none"
? findReusableFileViewerPane({
workspaceId,
activeTabId: activeTab.id,
Expand Down Expand Up @@ -828,7 +826,7 @@ export const useTabsStore = create<TabsStore>()(

// If we found an unpinned (preview) file-viewer pane, reuse it
// (skip reuse when explicitly requesting a new tab, e.g. cmd+click)
if (fileViewerPanes.length > 0 && canReuseExistingPane) {
if (fileViewerPanes.length > 0 && !options.openInNewTab && reuseExisting !== "none") {
const paneToReuse = fileViewerPanes[0];
const existingFileViewer = paneToReuse.fileViewer;
if (!existingFileViewer) {
Expand Down
Loading