Skip to content

Changing name of terminal with split terminals in Switch Active Terminal changes wrong terminal name #48671

Closed

Description

  • VSCode Version:
Version 1.22.2
Commit 3aeede733d9a3098f7b4bdc1f66b63b0f48c1ef9
Date 2018-04-12T16:38:45.278Z
Shell 1.7.12
Renderer 58.0.3029.110
Node 7.9.0
Architecture x64
  • OS Version: Windows 10

Steps to Reproduce:

  1. Open terminal (AKA term1) and split it (with Ctrl+\)
  2. Open another terminal (AKA term2)
  3. Ctrl+Shift+P Switch Active Terminal
  4. Click on the Rename button of term1 and change it's name, this changes fine: bash, bash -> client, bash
  5. Click on the Rename button of term2 and change it's name, this changes the name of the second split terminal of term1: client, bash -> client, server

Bug is bad

  1. This happens when opening more terminals or split terminals.
    Basically, the Rename action changes the terminal at index = line in the list of terminals,
    but the list of terminals contains all the split terminals, so index = 2 in the switch list is the second terminal in the terminals list, which is the split terminal of term1 in the example.

Activity

  1. vscodebot commented on Apr 25, 2018

    @vscodebot
  2. changed the title [-]Changing name of terminal with split terminals in `Switch Active Terminal`[/-] [+]Changing name of terminal with split terminals in `Switch Active Terminal` changes wrong terminal name[/+] on Apr 25, 2018
  3. added
    terminal
    on Apr 25, 2018
  4. gioragutt commented on Apr 25, 2018

    @gioragutt
    ContributorAuthor

    This also happens with the Delete button, same idea. Deletes the wrong terminal.

  5. gioragutt commented on May 4, 2018

    @gioragutt
    ContributorAuthor

    Tyrair can I get a comment on this?

  6. added
    bug
    on May 6, 2018
  7. added this to the May 2018 milestone on May 6, 2018
  8. Tyriar commented on May 6, 2018

    @Tyriar
    Contributor

    Giora Guttsait (@gioragutt) sorry, working through a big backlog of notifications. I can repro the bug, will see if I can get it fixed in 1.24 👍

  9. Tyriar commented on May 6, 2018

    @Tyriar
    Contributor

    Giora Guttsait (@gioragutt) I fixed it, this was missed when the split concept was added. It will now rename/kill the last active terminal (not necessarily the first) within the selected "tab".

  10. gioragutt commented on May 6, 2018

    @gioragutt
    ContributorAuthor

    Daniel Imms (@Tyriar) First of all, thanks for the reply and work, that's immensely appreciated.

    The change is acceptable, although, you could just assign an index to each terminal and have it displayed in the dropdown.

    f.e: tab 1 contains terminals 1, 2 and 3, and tab 2 contains 1 and 2.

    The dropdown could consist of:

    • 1.1 <name>
    • 1.2 <name>
    • 1.3 <name>
    • 2.1 <name>
    • 2.2 <name>

    That's just as easy to implement, and might give more control over the terminals.
    I haven't seen the source code for terminals, but if you iterate over tabs and you can get the terminals, or you can link each terminal to the index of it's tab, then that's quite straightforward.

    Daniel Imms (@Tyriar) I can even try for a PR if you're okay with my proposition

    Ori A (@oriash93) תוקן 👍

  11. Tyriar commented on May 11, 2018

    @Tyriar
    Contributor

    I noticed this is also inconsistent with the view quick open:

    image

    Let's do it and make the numbering consistent in that view while we're at it. The feature request for this is at #44572

  12. locked and limited conversation to collaborators on Jun 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugterminalverified

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions