Skip to content

New panes should inherit the tab color of the active pane when they're split #18930

@tnodet

Description

@tnodet

Windows Terminal version

1.22.11141.0

Windows build number

10.0.26100.4061

Other Software

No response

Steps to reproduce

  1. Close all instances of Microsoft Terminal
  2. Open a cmd prompt or Powershell
  3. Run this command:
  • CMD: wt new-tab -p "Windows PowerShell" --tabColor "#FF0000" --title "Hello World" ; split-pane -p "Windows PowerShell"
  • Powershell: wt new-tab -p "Windows PowerShell" --tabColor "#FF0000" --title "Hello World" ; split-pane -p "Windows PowerShell"

Expected Behavior

The resulting tab in Terminal should have the correct title and color set from command line.

Image

Actual Behavior

The resulting tab in Terminal has the default title and color (not the ones defined in the command line).

Image

If you run the same commands but with a semicolon at the end:

  • CMD: wt new-tab -p "Windows PowerShell" --tabColor "#FF0000" --title "Hello World" ; split-pane -p "Windows PowerShell" ;
  • Powershell: wt new-tab -p "Windows PowerShell" --tabColor "#FF0000" --title "Hello World" ; split-pane -p "Windows PowerShell" ;
    Then the resulting tab in Terminal have the correct title and color set from command line (and in addition, it opens another default terminal tab).

Image

This is also the case using "startupActions" inside settings.json`:

  • ❌ bugged: "new-tab -p \"Windows PowerShell\" --tabColor \"#FF0000\" --title \"Hello World\" ; split-pane -p \"Windows PowerShell\""
  • ✅ okay: "new-tab -p \"Windows PowerShell\" --tabColor \"#FF0000\" --title \"Hello World\" ; split-pane -p \"Windows PowerShell\" ;"

Activity

added theissue type on May 20, 2025
added
Issue-BugIt either shouldn't be doing this or needs an investigation.
Needs-TriageIt's a new issue that the core contributor team needs to triage at the next triage meeting
on May 20, 2025
tnodet

tnodet commented on May 20, 2025

@tnodet
Author

Ok I realize now what's happening: the title and color are per pane, not per tab.
It wasn't showing because the focus falls on the second pane.
If I click in the first pane, then it changes the title and color of the tab.

So the workaround is to set the title and tabColor on every pane of the tab.

This behavior is a bit confusing IMO.
If not specified explicitely, I think new panes should have the same title and tabColor as their "parent" tab.

changed the title [-]Tab color and title not properly set from command line if using split-pane and no semicolon at the end[/-] [+]New panes should inherit the tab color of the active pane when they're split[/+] on May 28, 2025
added
Help WantedWe encourage anyone to jump in on these.
Issue-TaskIt's a feature request, but it doesn't really need a major design.
and removed
Issue-BugIt either shouldn't be doing this or needs an investigation.
on May 28, 2025
added this to the Backlog milestone on May 28, 2025
DHowett

DHowett commented on May 28, 2025

@DHowett
Member

Thanks for debugging this. I renamed the issue to track how we'd probably fix it, per your recommendation!

removed
Needs-TriageIt's a new issue that the core contributor team needs to triage at the next triage meeting
on May 28, 2025

5 remaining items

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Help WantedWe encourage anyone to jump in on these.Issue-TaskIt's a feature request, but it doesn't really need a major design.Needs-Tag-FixDoesn't match tag requirementsPriority-3A description (P3)Product-TerminalThe new Windows Terminal.

    Type

    Projects

    No projects

    Relationships

    None yet

      Development

      Participants

      @DHowett@tnodet

      Issue actions

        New panes should inherit the tab color of the active pane when they're split · Issue #18930 · microsoft/terminal