Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: prevent creating new tab when openInNewTab is not set #751

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

edongashi
Copy link
Contributor

Fixes #634, #583, #530, #401, #338.

As per API docs:

If newLeaf is false (or not set) then an existing leaf which can be navigated
is returned, or a new leaf will be created if there was no leaf available.

Note that settings must be enhanced to support an additional state (option 3):

  1. Current tab (when open in new tab is unchecked) - fixed in this PR
  2. New tab with split (vertical/horizontal) - exists
  3. New tab without split - handled if direction is not set. Current settings do not support this.

I guess most people would like 1 and 3. 2 is a bit niche, as splits are annoying.

Copy link

vercel bot commented Nov 3, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
quickadd ✅ Ready (Inspect) Visit Preview Nov 3, 2024 1:04am

@JayPritchet
Copy link

Hi, It seems the changes in your commit will not achieve the goal.

I tested your code, it will close the opened file in current active tab, and then open the desired file in the same tab.

I created a new pr, it will check if there is an exsiting tab that already opened the file. If true, it will switch to that tab, otherewise it will created a new tab and focus on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEATURE REQUEST] Templates choice - a setting that opens the file created in the current tab
2 participants