Skip to content

Multiple commands in one key stroke seems to happen in wrong order #15932

@troncoso

Description

@troncoso

Check for existing issues

  • Completed

Describe the bug / provide steps to reproduce it

I want a keystroke that runs a task, focuses on the terminal, then zooms in on the terminal. However, there is a flash where the main editor is zoomed for a second, then returns to normal before open the new terminal, but not zoomed in. This is my key binding:

[
    {
        "context": "Workspace",
        "bindings": {
            "ctrl-z": "workspace::ToggleZoom",
            "ctrl-cmd-shift-g": ["task::Spawn", { "task_name": "Lazygit" }],
            "ctrl-cmd-g": [
                "workspace::SendKeystrokes",
	        "ctrl-cmd-shift-g ctrl-z"
            ]
        }
    }
]

This is my task:

[
    {
        "label": "Lazygit",
        "command": "lazygit",
        "use_new_terminal": true,
        "allow_concurrent_runs": false,
        "reveal": "always"
    }
]

Environment

Zed: v0.147.2 (Zed)
OS: macOS 14.5.0
Memory: 64 GiB
Architecture: aarch64

If applicable, add mockups / screenshots to help explain present your vision of the feature

Here is a video demonstrating the problem:

Screen.Recording.2024-08-07.at.4.27.14.PM.mov

If applicable, attach your Zed.log file to this issue.

Zed.log

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:controls/keybindsKeyboard shortcuts, mapping, binding, keymaps, etcarea:tasksFeedback for Zed tasksbugDEPRECATED label: use issue type 'Bug' insteadstaleLabel used by `stale` action

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions