Skip to content

Conversation

@hron
Copy link
Contributor

@hron hron commented Aug 17, 2024

There is no way to revert a hunk in diff editor via keyboard. diffEditor.revert can be used only via clicking on the gutter icon.

This commit extends this function, so it uses current position or selection to detect which hunks have to be reverted.

Closes #225879

@hron hron force-pushed the diff-editor-revert-keyboard-fix branch 2 times, most recently from 43b3fbd to a910f63 Compare August 17, 2024 15:21
@hron
Copy link
Contributor Author

hron commented Aug 17, 2024

@microsoft-github-policy-service agree

@hediet hediet added this to the August 2024 milestone Aug 19, 2024
@hediet hediet modified the milestones: August 2024, September 2024 Aug 29, 2024
@hediet hediet modified the milestones: September 2024, October 2024 Sep 26, 2024
@hediet hediet modified the milestones: October 2024, November 2024 Oct 24, 2024
@hron hron force-pushed the diff-editor-revert-keyboard-fix branch 2 times, most recently from fe5a38f to 3b61d8d Compare November 10, 2024 19:25
@hediet hediet modified the milestones: November 2024, January 2025 Dec 5, 2024
@hron hron force-pushed the diff-editor-revert-keyboard-fix branch 2 times, most recently from a079ffe to 3e1c3e1 Compare December 6, 2024 13:53
@hediet hediet modified the milestones: February 2025, Backlog Feb 7, 2025
There is no way to revert a hunk in diff editor via keyboard.
`diffEditor.revert` can be used only via clicking on the gutter icon.

This commit extends this function, so it uses current position or
selection to detect which hunks have to be reverted.

Closes microsoft#225879
@hron hron force-pushed the diff-editor-revert-keyboard-fix branch from 3e1c3e1 to 628c0b1 Compare May 28, 2025 11:07
@hediet hediet modified the milestones: Backlog, June 2025 Jun 3, 2025
@hediet hediet modified the milestones: June 2025, July 2025 Jul 1, 2025
@hediet hediet removed this from the July 2025 milestone Jul 31, 2025
@hediet hediet added this to the August 2025 milestone Jul 31, 2025
@hediet hediet modified the milestones: August 2025, September 2025 Sep 2, 2025
@xlilos
Copy link

xlilos commented Sep 10, 2025

I would love to see this get merged! It is really annoying having to go back to my mouse when jumping between changes in a diff. Is there anything remaining that is preventing this from getting merged?

@hediet hediet enabled auto-merge (squash) September 11, 2025 13:13
@hediet hediet merged commit 6efb311 into microsoft:main Sep 11, 2025
17 checks passed
@vs-code-engineering vs-code-engineering bot locked and limited conversation to collaborators Oct 28, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DiffEditor: Revert a hunk or selection via keyboard

5 participants