-
-
Notifications
You must be signed in to change notification settings - Fork 593
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
Add multiple selection in diff view #231
Add multiple selection in diff view #231
Conversation
looks already like a great start. only two minor things:
|
665098d
to
bb8a50a
Compare
I have updated the PR. ad 1) I found the initial behavior unexpected, too. I changed it so that Doing the actual copying seems simple. At least on my machine (Ubuntu 20.04, X11), it worked immediately. Coming from vim, I have bound copy to |
@cruessler I checked out the changes. works better now, but I would like to be able to also scroll up beyond the start selection line (basically inverting start/end selection index). |
bb8a50a
to
8e1ac88
Compare
@extrawurst I just updated the PR with another round of changes! You can now move the end past the start, and the content of the window scrolls, so that the end is always visible. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey man, this is getting close. Sorry for another round of feedback. Looks pretty good already. Hope those last few are not a big deal anymore. Love to merge this!❤️
8e1ac88
to
ecd35f5
Compare
@cruessler aside the linux question, can you rebase once more onto master, so we see if the windows pipeline (that got fixed now) runs through? |
- Draw `msg` after `inspect_commit_popup` to make sure the error message is visible - Move `try_or_popup!` to `utils`
ecd35f5
to
a436b6c
Compare
Thanks so much @cruessler - great work! |
@extrawurst One addition: I just saw that there are packages for Fedora and Arch. It is possible that they might need to be adapted to support clipboard access, but I am not familiar with building packages, so I don’t know how they work. |
@ignatenkobrain maintains fedora and @wezm did AUR maybe you guys can chip in before we release this and ruin your day? :) |
Looks like there's a couple of new runtime dependencies ( |
I think it is fine for Fedora, but right now we are not able to build gitui because there is some bug that makes rustc to segfault on ppc64le. |
This is a first attempt at implementing multiple selection in the diff view.
You can use
Shift+ArrowUp
as well asShift+ArrowDown
to extend theselection.
Known issue: If the selection spans more than one hunk, only the hunk that
contains the selection’s start is selected. I don’t know a good way to address
that. Preventing the selection from spanning more than hunk seems like an
obvious choice, but then, of course, you could only copy lines out of one hunk
at a time.
Still left to do is the actual copying to clipboard, but that should be fairly
easy once the above issue is resolved.
Closes #229.