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

:tab-move end doesn't work when moving tabs from a subtree #8167

Open
toofar opened this issue Apr 21, 2024 · 0 comments
Open

:tab-move end doesn't work when moving tabs from a subtree #8167

toofar opened this issue Apr 21, 2024 · 0 comments
Labels
component: tree tabs Issues related to tree tabs functionality easy Issues which are likely to be a good fit for first-time contributors.

Comments

@toofar
Copy link
Member

toofar commented Apr 21, 2024

Version info:

3bd272d on tree-tabs-integration

Does the bug happen if you start with --temp-basedir?:

With -s tab.tree_tabs true, yeah.

Description

Tabs moved from a subtree to the end of the tab bar don't quite end up at the end, they end up one tab short of the end. As spotted in #8102

I suspect it can be resolved by special casing index == "end" here. But should we be looking at the value of index in that part of the code when we are already doing so in the bit above? Also why doesn't it seem to be working for moving a tab that's already at the top of the tree to the end?

How to reproduce

Plop this in tests/end2end/features/treetabs.feature and run like python3 -m pytest tests/end2end/features/test_treetabs_bdd.py -k from_a_subtree_to_end:

    Scenario: Move a tab from a subtree to "end"
        When I open data/numbers/1.txt
        And I open data/numbers/2.txt in a new related tab
        And I open data/numbers/3.txt in a new tab
        And I open data/numbers/4.txt in a new tab
        And I run :tab-focus 2
        And I run :tab-move end
        Then the following tabs should be open:
          - data/numbers/1.txt
          - data/numbers/3.txt
          - data/numbers/4.txt
          - data/numbers/2.txt (active)

CC #8077 as it might end up getting fixed as part of that.

@toofar toofar added easy Issues which are likely to be a good fit for first-time contributors. component: tree tabs Issues related to tree tabs functionality labels Apr 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: tree tabs Issues related to tree tabs functionality easy Issues which are likely to be a good fit for first-time contributors.
Projects
Status: Backlog
Development

No branches or pull requests

1 participant