gitx icon indicating copy to clipboard operation
gitx copied to clipboard

Please add the ability to copy from the diff window

Open firedev opened this issue 12 years ago • 15 comments

Apart from missing line-wrap #155 it would be great if I could copy from the diff window.

At the moment not only I can't select text (it highlights the whole line), but it's impossible to copy either.

firedev avatar Mar 20 '13 09:03 firedev

+1

WattsInABox avatar Jun 06 '13 18:06 WattsInABox

I'd love this too

dragos avatar Jun 06 '13 21:06 dragos

I want this too. And I always felt that this is a basic function.

sugarmo avatar Jun 07 '13 06:06 sugarmo

I agree copying from the diff window would be great, but only as long as the functionality to stage individual lines or line ranges is kept.

afh avatar Jun 09 '13 11:06 afh

Pull Request #191 is my proposal to this problem: a button at the top right of the diff view next to the context slider to toggle between the selection modes stage and copy. What do you think?

Stage mode

stage

Copy mode

copy

afh avatar Jun 09 '13 12:06 afh

Actually I need to copy when looking at older commits. To re-apply some code or stuff like that.

Regarding staging, I don't see why it can't allow both copying and staging at the same time. But anyway, I am worrying about copying code from commit diffs.

Nick

On 9 Jun 2013, at 19:47, Alexis Hildebrandt [email protected] wrote:

Pull Request #191 is my proposal to this problem: a button at the top of the diff view to toggle between the selection modes stage and copy.

— Reply to this email directly or view it on GitHub.

firedev avatar Jun 10 '13 03:06 firedev

@firedev Copying from older commits already works for me (see screenshot below). Please describe in more detail what you would like to do in order to "copy from the diff window".

screen shot 2013-06-13 at 14 35 14

afh avatar Jun 13 '13 12:06 afh

You can't copy from Stage window where you mark lines for commit.

Sorry for my confusing messages prior, I was sending it form my phone without actually taking a look.

Nick

On Thursday, 13 June 2013 at 19:37, Alexis Hildebrandt wrote:

@firedev (https://github.com/firedev) Copying from older commits already works for me (see screenshot below). Please describe in more detail what you would like to do in order to "copy from the diff window".

— Reply to this email directly or view it on GitHub (https://github.com/rowanj/gitx/issues/161#issuecomment-19388763).

firedev avatar Jun 13 '13 12:06 firedev

Also when you copy anywhere, multi-line copying doesn't really seem to be possible.

WattsInABox avatar Jun 13 '13 12:06 WattsInABox

I'm not sure a Stage-Select toggle is the best way to go, because I expect selection and copy-paste to always work, and hiding it behind a toggle seems counter-intuitive IMHO. Maybe it's possible to detect in which direction the selection is started and choose Stage or Select depending on that (selection moving left-right => Select, selection moving top-bottom => Stage) ?

tiennou avatar Jun 13 '13 13:06 tiennou

Another option would be to use the line numbers to toggle per-line staging. That way the regular cursor selection could be used solely for copying.

jaywilliams avatar Jun 13 '13 14:06 jaywilliams

I don't think the interface for copying needs to be a mode; copying a selection should Just Work. I know the HTML/JS interface is terrible for controlling that, but I think adding modes is going to compound the issue more than solve it.

rowanj avatar Jun 13 '13 14:06 rowanj

I agree, that modes would make it a lot more complicated than necessary. Selecting text is already possible, so the solution can't be that far. For a first step being able to copy linewise, would already be great.

wrtsprt avatar Nov 22 '13 05:11 wrtsprt

+1

davidhq avatar May 08 '14 14:05 davidhq

+1

zeke avatar Feb 12 '15 00:02 zeke