Git - Unable to set a shortcut to stage or revert git change after Show Next Change (when dirtyDiffVisible)ย #62534
Closed as not planned
Closed as not planned
Description
- VSCode Version: 1.28.2
- OS Version: macOS High Sierra 10.13.5
Steps to Reproduce:
- Assign a shortcut to stage and revert change when dirtyDiffVisible. Below is what I had in my keybindings.json file.
{
"key": "alt+cmd+a",
"command": "git.stageChange",
"when": "dirtyDiffVisible"
},
{
"key": "alt+cmd+z",
"command": "git.revertChange",
"when": "dirtyDiffVisible"
}
- Load a file with some unstaged changes. Use command
Show next change
from the command palette to go to next change and bring up dirty diff view. When evoking the shortcut to either stage or revert the change, the following error message pops up "Git: Cannot read property 'toString' of undefined"
Clicking the buttons manually doesn't produce the issue, but using the keyboard shortcut does. As you can see from the screenshot, it seems like vscode has correctly mapped the action to the shortcut.
Does this issue occur when all extensions are disabled?: Yes
Activity