New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ensure that scm.focus command works in all cases #131006
Comments
FYI, in the Insiders Build with this keybinding: {
"key": "alt+e",
"command": "workbench.scm.focus"
} focus does indeed go to the commit message input box. Unless say a file in the scm view previously had focus - as in click a file to open its scm diff editor. Then the above keybinding goes back to that file and not the message box. I assume this is expected behaviour? Version: 1.61.0-insider (user setup) |
The way it used to work (A): I could press Ctrl-Alt-G at any time, and VS Code would always focus the commit message box, and I could immediately start typing a commit message and then Ctrl-Enter to commit. Since about 3 months ago, VS Code has a different behaviour (B): when I press Ctrl-Alt-G, then sometimes VS Code focuses the commit message and sometimes it focuses one of the changed files in the Git pane. If it focuses on a changed file, then it's not clear how to use the keyboard to move the focus to the commit message. Having a keyboard shortcut that always goes directly to the commit message is very useful, so I much prefer (A) than (B). But at least thanks to @ArturoDent I can understand why it sometimes does what I want and sometimes not. |
@yellowtailfan It appears that from a focused file in the scm view you can Home and then Enter to focus the commit message box. I suppose you could make a macro with {
"key": "alt+z",
"command": "extension.multiCommand.execute", // using the multi-command macro extension
"args": {
"sequence": [
"workbench.scm.focus",
"list.focusFirst",
"list.select"
]
},
"when": "editorTextFocus"
}, This actually works quite nicely. |
Wow thank you for creating a macro, that looks quite handy. I was also inspired to experiment a bit before I saw your reply, and I found that pressing |
Related to #119904
The text was updated successfully, but these errors were encountered: