Skip to content

Switching tab as part of running multiple actions does not focus tab immediately #11107

@Rosefield

Description

@Rosefield

Windows Terminal version (or Windows build number)

dev/main, but also potentially preview through commandline

Other Software

No response

Steps to reproduce

Trying to use the multipleActions action with this command (trying to update the docs)

        { "name": "Create My Layout", "command": { 
            "action": "multipleActions",
            "actions": [
                // Create a new tab with 3 panes
                { "action": "newTab", "tabTitle": "Work", "colorScheme": "One Half Dark" },
                { "action": "splitPane", "split": "vertical", "profile": "Windows PowerShell", "tabTitle": "Work", "colorScheme": "Campbell Powershell", },
                { "action": "splitPane", "split": "horizontal", "profile": "Windows PowerShell", "tabTitle": "Work", "colorScheme": "Campbell Powershell", },
                // Create a second tab
                { "action": "newTab", "tabTitle": "Misc"},
                // Go back to the first tab and zoom the first pane
                { "action": "prevTab", "tabSwitcherMode": "disabled"},
                { "action": "moveFocus", "direction": "first"},
                "togglePaneZoom"
                ]
            }}

Results in not zooming or focusing the correct pane.

Expected Behavior

The first new tab will be focused, and the first pane on it should be zoomed.

Actual Behavior

The first new tab is focused, but the last created pane is focused and nothing is zoomed because the activeTab is still the 2nd tab even after prevTab is run until the event loop catches up.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-UserInterfaceIssues pertaining to the user interface of the Console or TerminalIssue-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 meetingPriority-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

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions