Skip to content

The show_command_palette command does not work in some contexts #2079

@briankchan

Description

@briankchan

Version info

  • OS: Windows 11
  • Build: 2112 (but has been present for many prior versions)

Description

The show_command_palette does always not work when used in some menus, including Branch.sublime-menu and Tag.sublime-menu.

Steps to reproduce

Steps to reproduce the behavior:

  1. Add a debug git command, e.g. by adding to ~/.gitconfig:
    [alias]
      echo = "!echo"
  2. Add to Sublime Merge\Packages\User\Branch.sublime-menu:
    [
      {
        "caption": "Debug: Echo text...",
        "command": "show_command_palette",
        "args": {
          "command": "git",
          "args": {"argv": ["echo", "$text"]}
        }
      }
    ]
  3. Open a 'normal' Git repo in Sublime Merge (has a commit on a branch)
  4. Right click on a commit in the Commits panel that has a branch, then use the newly-added debug command

Expected behavior

The command palette should open, allowing the user to input text.

Actual behavior

The git echo command runs with empty $text, skipping the command palette entirely.

Note: The command actually works correctly when used from a branch in the Locations panel.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions