question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

'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:open
  • Created 4 years ago
  • Reactions:4
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
georgefstcommented, Jun 16, 2020

Any progress here? This is still something that would improve my life immeasurably.

1reaction
georgefstcommented, Jan 14, 2020

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found