-
Notifications
You must be signed in to change notification settings - Fork 38.4k
Closed
Labels
insiders-releasedPatch has been released in VS Code InsidersPatch has been released in VS Code Insiders
Milestone
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.revertto 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:
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
insiders-releasedPatch has been released in VS Code InsidersPatch has been released in VS Code Insiders