Incorrect tab behavior after using Ctrl+w #991

Closed
opened 2026-01-30 22:13:17 +00:00 by claunia · 2 comments
Owner

Originally created by @sasmithjr on GitHub (May 11, 2019).

  • Your Windows build number:

    • Microsoft Windows [Version 10.0.18362.86]
    • Did a git pull master before using VS2019 to deploy locally.
  • What you're doing and what's happening:

    1. To start, have 4 tabs open.
    2. Go to the 1st tab
    3. Hit Ctrl + w to close it. Terminal behaves as expected and closes the tab
    4. Both a and b below are where the bug shows up:
      a. Hit Ctrl + w again. The new 2nd tab (originally the 3rd tab) closes instead
      b. Hit Ctrl + Tab to cycle. Focus will change from the 1st tab to the 3rd tab (originally 4th) tab. 1st tab will also retain focused coloring.

    Also: If you start with 3 tabs open and then close the first one with Ctrl + w, you're not able to use Ctrl + Tab to cycle to the next tab.

    4a and 4b are not consecutive steps. They're different actions which can mess up after step 3

  • What's wrong / what should be happening instead:
    For 4a: focused tab should close
    For 4b: 2nd tab should become selected, not the 3rd.

If there's any more information you need, please let me know!

Originally created by @sasmithjr on GitHub (May 11, 2019). * Your Windows build number: * Microsoft Windows [Version 10.0.18362.86] * Did a `git pull master` before using VS2019 to deploy locally. * What you're doing and what's happening: 1. To start, have 4 tabs open. 2. Go to the 1st tab 3. Hit Ctrl + w to close it. Terminal behaves as expected and closes the tab 4. Both a and b below are where the bug shows up: a. Hit Ctrl + w again. The new 2nd tab (originally the 3rd tab) closes instead b. Hit Ctrl + Tab to cycle. Focus will change from the 1st tab to the 3rd tab (originally 4th) tab. 1st tab will also retain focused coloring. Also: If you start with 3 tabs open and then close the first one with Ctrl + w, you're not able to use Ctrl + Tab to cycle to the next tab. 4a and 4b are not consecutive steps. They're different actions which can mess up after step 3 * What's wrong / what should be happening instead: For 4a: focused tab should close For 4b: 2nd tab should become selected, not the 3rd. If there's any more information you need, please let me know!
claunia added the Help WantedIssue-BugArea-UserInterface labels 2026-01-30 22:13:18 +00:00
Author
Owner

@zadjii-msft commented on GitHub (May 13, 2019):

Oh lawd that looks messed up. Good catch.

Anyone who's taking a look at this, I'd direct your attention to src/cascadia/TerminalApp/App.cpp. That manages the entire list of tabs, so it's probably where we're focusing tabs incorrectly.

@zadjii-msft commented on GitHub (May 13, 2019): Oh lawd that looks messed up. Good catch. Anyone who's taking a look at this, I'd direct your attention to `src/cascadia/TerminalApp/App.cpp`. That manages the entire list of tabs, so it's probably where we're focusing tabs incorrectly.
Author
Owner

@bef178 commented on GitHub (May 13, 2019):

This is even worse with mouse-click.
Repo:
1 open 4 tabs, say a, b, c and d
2 activate a
3 click a's close button, then b
4 actual: tabview exists; all items in tabview is grayed; tab shows b's content and user can still operate on it

@bef178 commented on GitHub (May 13, 2019): This is even worse with mouse-click. Repo: 1 open 4 tabs, say a, b, c and d 2 activate a 3 click a's close button, then b 4 actual: tabview exists; all items in tabview is grayed; tab shows b's content and user can still operate on it
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#991