'Revert selected ranges' should work on individual lines, not hunks
See original GitHub issue- VS Code version: Code 1.41.1 (26076a4de974ead31f97692a0d32f90d735645c0, 2019-12-18T15:04:31.999Z)
- OS version: Linux x64 4.15.0-72-generic (Ubuntu 16)
- Does this issue occur when all extensions are disabled?: Yes
Revert selected ranges
reverts any hunks in which there is a cursor. This is annoying when one wants more fine-grained control. Especially seeing as it is already easy to revert by hunk through other features.
Note that this is contrary to Stage selected ranges
, which correctly stages only the selected lines
Issue Analytics
- State:
- Created 4 years ago
- Reactions:4
- Comments:7 (2 by maintainers)
Top Results From Across the Web
Revert selected ranges always reverts all adjecent lines #58326
Right click -> revert selected range (ctrl + backspace). Expected: revert only selected range, as in "stage/unstage selected range" behaviouir.
Read more >VS Code tips — Stage and revert selected ranges - YouTube
Today's VS Code tip: stage and revert selected rangesIf you only want to commit some of the changes in a file, use 'stage...
Read more >Stage individual lines and hunks in a file
1 option. Selecting by range (not having to push the entire line) is something I use often in Visual Studio Code - context...
Read more >Git Diff - How do I revert selected lines or chunks
Unstage the lines/hunks you want reverted; Select the file in the Unstaged Changes pane and Commit->Revert Changes to undo all (unstaged) ...
Read more >Line-staging (Interactive Staging) - Visual Studio Blog
Work is in progress to add the following features: Ability to stage specific lines within chunks or sections of changes; Ability to un-stage ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Any progress here? This is still something that would improve my life immeasurably.
You might have made two unrelated changes on adjacent lines, and only want to revert one of them. With hunks, you lose this granularity. Besides, it’s inconsistent with
Stage selected ranges
.