Skip to content

The nextTab and prevTab actions do not work correctly when initiated via wt.exe or the command palette #10070

@gurnec

Description

@gurnec

In short, wt focus-tab --next and --previous don't do anything at all on my system, while Next tab and Previous tab via the command palette behave oddly, although I can't imagine that the latter is often used by anyone.

Windows Terminal version (or Windows build number)

1.8.1032.0

Steps to reproduce

Case 1:

Run wt -w new new-tab ; new-tab ; focus-tab --next (or --previous).

Case 2:

Run wt -w new new-tab ; new-tab.

In the new window, run wt -w 0 focus-tab --next (or --previous).

Case 3:

Run wt -w new new-tab ; new-tab ; new-tab.

In the new window, open the command palette (by default using Ctrl+Shift+P) and type in Next tab (or Previous tab) Enter.

Expected Behavior

Case 1:

The first tab is focused.

Case 2:

The first tab is focused.

Case 3:

The desired tab (according to the tabSwitcherMode) is focused.

Actual Behavior

Case 1:

The focus-tab subcommand is ignored; the second tab remains focused.

Case 2:

The focus-tab subcommand is ignored; the second tab remains focused.

Note that in the two cases above, wt focus-tab --target 0 works correctly.

Case 3:

This depends on the tabSwitcherMode:

  • mru — the desired tab is focused for a split second, and then the originally-focused tab regains focus.
  • inOrder — the desired tab is focused for a split second, and then tab index 0 gains focus.
  • disabled — the desired tab is focused (there is no bug in this case).

My apologies if I should have separated this into two issues.

Thanks!

Metadata

Metadata

Assignees

Labels

Area-Commandlinewt.exe's commandline argumentsIssue-BugIt either shouldn't be doing this or needs an investigation.Needs-Tag-FixDoesn't match tag requirementsPriority-2A description (P2)Product-TerminalThe new Windows Terminal.Resolution-Fix-CommittedFix is checked in, but it might be 3-4 weeks until a release.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions