Skip to content
Merged
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions src/engine/MacroChoiceEngine.openFileOptions.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ describe("buildOpenFileOptions", () => {
expect(options.location).toBe("right-sidebar");
});

it("keeps legacy default behavior: new tab when openInNewTab is false", () => {
it("opens in the current tab when openInNewTab is false", () => {
const options = buildOpenFileOptions(
createCommand({ openInNewTab: false, location: undefined })
);

expect(options.location).toBe("tab");
expect(options.location).toBe("reuse");
expect(options.direction).toBeUndefined();
});

Expand Down
4 changes: 2 additions & 2 deletions src/engine/helpers/openFileOptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ export function buildOpenFileOptions(
: undefined;

// Legacy mapping (pre-location field):
// openInNewTab === false -> open in a new tab (not reuse)
// openInNewTab === false -> reuse the current tab
// openInNewTab === true without direction -> split (default vertical)
if (!openInNewTab) {
return { location: "tab", focus, mode: "default" };
return { location: "reuse", focus, mode: "default" };
}

return {
Expand Down
2 changes: 1 addition & 1 deletion src/gui/MacroGUIs/OpenFileCommandSettingsModal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ export class OpenFileCommandSettingsModal extends Modal {
if (this.command.openInNewTab) {
return "split";
}
return "tab";
return "reuse";
}


Expand Down