Open
Description
Type: Feature Request
Currently, it's impossible to revert a diff hunk or selection under the cursor in the diff editor. Even though, there is diffEditor.revert
action it cannot be used when assigned to a keyboard shortcut because it assumes to be called via gutter icon only.
To reproduce the issue:
- Assign
diffEditor.revert
to a keyboard shortcut like that:
{
"key": "ctrl+alt+z",
"command": "diffEditor.revert",
"when": "inDiffEditor"
}
- Run VSCode to compare some files, e.g. code --diff /tmp/test1.txt /tmp/test2.txt
- Navigate to a diff hunk
- Press
ctrl+alt+z
Expected results:
The hunk under cursor should be reverted.
Actual results:
VSCode just raises a notification with error "Cannot read properties of undefined (reading 'originalUri')"
VS Code version: Code - Insiders 1.93.0-insider (d751e43, 2024-08-16T05:03:54.591Z)
OS version: Linux x64 6.8.0-40-generic
Modes: