Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Copying old/new version of hunks in diff view #2385

Open
maliayas opened this issue Dec 3, 2024 · 0 comments
Open

[Feature Request] Copying old/new version of hunks in diff view #2385

maliayas opened this issue Dec 3, 2024 · 0 comments

Comments

@maliayas
Copy link

maliayas commented Dec 3, 2024

Diff view has "Copy" and "Copy as Patch" via right click. "Copy" copies selected lines including old and new versions of the changed lines. This is rather useless because if the user wants to copy both old and new versions he would also probably want those in patch format which is already available via "Copy as Patch".

So I propose here removing the "Copy" from the right click menu and adding "Copy Old Version" and "Copy New Version" options. So for example when a hunk is selected in a diff and "Copy New Version" is clicked, then all the white and green lines in that hunk will end up in the copied text, and not the red lines.

I think this would be a useful addition because doing such a copying currently is not easy:

  • "Copy New Version":

    1. Right click on file name
    2. Press "Show in File Tree"
    3. In the opened file, scroll until you arrive at the correct line
    4. Select lines and copy
  • "Copy Old Version": Even more steps

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant