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

Selection in diff to copy lines to clipboard #229

Closed
extrawurst opened this issue Aug 9, 2020 · 1 comment · Fixed by #231
Closed

Selection in diff to copy lines to clipboard #229

extrawurst opened this issue Aug 9, 2020 · 1 comment · Fixed by #231
Labels
enhancement New feature or request
Milestone

Comments

@extrawurst
Copy link
Owner

extrawurst commented Aug 9, 2020

I regularly want to copy stuff out of diffs.

This requires supporting selecting multiple lines in the diff view.

Then we can add a new command to copy the selected block into the clipboard.

This selection function would also be the foundation for per line staging (#59)

@extrawurst extrawurst added this to the v0.10 milestone Aug 9, 2020
@extrawurst extrawurst added the enhancement New feature or request label Aug 9, 2020
@extrawurst
Copy link
Owner Author

extrawurst commented Aug 9, 2020

I see this as a two step process:

  1. building the selection functionality into the diff view component to not only have a scroll position but a selection start position and figure out if we can use shift+arrows for this and visualize it in the draw method. if the shift key is not pressed while scrollen we can simply do selection_start=selection

1.b) hopefully we can use the Diff object the view is already saving to pull out the content of the selected lines otherwise we might need a new feature inside asyncgit (I would argue we dont)

  1. look into using https://crates.io/crates/clipboard to put the selected lines into os clipboard

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

Successfully merging a pull request may close this issue.

1 participant