sublime_merge icon indicating copy to clipboard operation
sublime_merge copied to clipboard

Cmd+Enter does not enter edit_commit mode

Open nk9 opened this issue 1 year ago • 1 comments

Version info

  • OS: macOS 12.6.1
  • Build: 2077

Description

When I select a commit in a repo which I have edit access to and then press Cmd+Return, nothing happens. When I begin editing the commit message using the context menu > Edit Commit > Edit Commit Message, I can stop editing and discard my changes using Escape. I can also save the commit message using Cmd+Return.

The default key bindings for OS X in the Sublime Merge package have these bindings, which I believe are relevant:

    { "keys": ["super+enter"], "command": "commit", "args": { "mode": "commit" },
        "context": [{ "key": "setting.commit_message" }, { "key": "can_commit" }]
    },
    { "keys": ["super+enter"], "command": "edit_commit",
        "context": [{ "key": "setting.commit_message" }, { "key": "read_only" }]
    },
    { "keys": ["super+enter"], "command": "save_commit_message",
        "context": [{ "key": "setting.commit_message" }, { "key": "is_editing_commit" }]
    },
    { "keys": ["escape"], "command": "cancel_edit_commit_message",
        "context": [{ "key": "setting.commit_message" }, { "key": "is_editing_commit" }]
    },

It appears that the first one isn't working. I don't understand what the second one is for. Maybe to allow selecting the text even in the case where you can't edit it?

I can enter commit mode as expected using this key binding:

    {
        "keys": ["super+enter"],
        "command": "edit_commit",
        "args": { "commit": "$commit" }
    },

But then Cmd+Return doesn't work to STOP editing and save the new commit message.

Steps to reproduce

Steps to reproduce the behavior:

  1. Open repository with edit access
  2. Select a commit
  3. Press Cmd+Return

Expected behavior

Given the default key bindings, I'd expect this to begin editing the commit message. Instead, nothing happens.

Other info I also discussed this on the Sublime Forum.

nk9 avatar Nov 19 '22 19:11 nk9