I'm confused as to when I can actually use this option as it's always greyed out, whether the lines are highlighted or not.
To discard a contiguous block containing both added and removed lines, you need to right-click the very narrow area between the line numbers and the +/- symbols. Otherwise the 'Discard modified lines' option is disabled.
When you have a block containing only one of added or removed lines, you can right-click on any individual line number and then discard that line from the menu. Alternatively you can use the same approach from above, first selecting multiple lines with the left mouse button, then right-clicking in the very narrow area to bring up the menu.
There is an open issue about this non-obvious UX here.
In a recent update they have moved the location of the narrow gutter of pixels you must click in order to bring up the desired context menu. In contrast to my previous answer it is now located to the left of the line numbers.
© 2022 - 2024 — McMap. All rights reserved.