Copy deleted lines from Diff View (hunk & inline)
Add the ability to copy / paste deleted lines when viewing diffs in inline and hunk views.
Right now the workaround is to use the split view to copy the deleted line(s).
Under consideration Suggested by: Alex Latham • Upvoted: 06 Mar • Comments: 3
However, this would presumably remove the ability to copy just the current code; any copied code would include both old and new lines from the diff.
There is already a right-click command to 'Copy deleted line', which is some help, though it took me a long time to discover. Something like 'copy deleted hunk' to get a group of contiguous deleted lines would go a long way towards meeting this need.
But the ideal would be that the default behavior is what you would normally expect: you can select and copy whatever you can see. Right-clicking on a selection could offer options like "copy only added text."
Joey Kelroy Admin
"Allow selection in diff view" (suggested by Pedro Madrid on 2023-02-02), including upvotes (1) and comments (0), was merged into this suggestion.