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

Don't change the names of "unnamed" tabs when closing/opening tabs #474

Closed
khs26 opened this issue May 9, 2021 · 6 comments
Closed

Don't change the names of "unnamed" tabs when closing/opening tabs #474

khs26 opened this issue May 9, 2021 · 6 comments
Labels
ease of use Issues where zellij has clunky or difficult to use behaviours enhancement New feature or request good first issue Good for newcomers

Comments

@khs26
Copy link
Contributor

khs26 commented May 9, 2021

Currently, if I have e.g. four tabs open:

  • foo
  • Tab #2 (unnamed)
  • Tab #3 (unnamed)
  • bar

If I close tab foo, then the following changes occur:

  • foo -> <dead>
  • Tab #2 -> Tab #1
  • Tab #3 -> Tab #2
  • bar -> bar

The renaming of the numbered tabs is quite confusing. We should probably treat the numbers as automatically generated names, that are retained for the lifetime of the tab.

@khs26 khs26 added good first issue Good for newcomers enhancement New feature or request ease of use Issues where zellij has clunky or difficult to use behaviours labels May 9, 2021
@a-kenji
Copy link
Contributor

a-kenji commented May 9, 2021

Thanks for writing this down!
I agree, also if someone picks this up, it would be great if the Tabs actually had this name.
Currently

  • Tab #2 (unnamed)

Also wouldn't be found by any sort of mechanism that tries to interact with the name,
eg. the search feature in #379.

@AdaShoelace
Copy link
Contributor

I'm currently working on implementing this but it has me asking some questions.
Lets say that we have three tabs open e.g Tab #1, Tab #2 and Tab #3. We then decide to close Tab #2, which will leave us with Tab #1 and Tab #3. In the case that we open a new tab will it fill the "hole" or just get appended as Tab #4 and leave the list with a "hole" at index 1?

@imsnif
Copy link
Member

imsnif commented May 31, 2021

Lets say that we have three tabs open e.g Tab #1, Tab #2 and Tab #3. We then decide to close Tab #2, which will leave us with Tab #1 and Tab #3. In the case that we open a new tab will it fill the "hole" or just get appended as Tab #4 and leave the list with a "hole" at index 1?

My vote goes for leaving a hole and opening Tab #4. I find the other behaviour a little surprising as a user "What? I just opened a tab, where is it?" - but maybe that's just me :)

@khs26
Copy link
Contributor Author

khs26 commented May 31, 2021 via email

@AdaShoelace
Copy link
Contributor

Great, I agree with leaving a "hole" aswell.
Know I just need to understand the relationship between the name and rendering the text. From what I can gather the tab itself will have an empty string for a name if it is unnamed but still get rendered as Tab #<num>.
Judging from this discussion this is not the way we want it to behave. But rather that it has a generated name.

@a-kenji
Copy link
Contributor

a-kenji commented Jun 1, 2021

This should be adressed by #554.

@a-kenji a-kenji closed this as completed Jun 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ease of use Issues where zellij has clunky or difficult to use behaviours enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

4 participants