gitu icon indicating copy to clipboard operation
gitu copied to clipboard

Text wrap git diff

Open musjj opened this issue 1 year ago • 3 comments

When viewing diffs with long lines (e.g. Tailwind styles), the line is truncated by gitu making them unhelpful. An option to make the lines wrap would be really useful.

image

musjj avatar Nov 01 '24 13:11 musjj

In my opinion, some kind of text-wrap should be default. The current solution to truncate was merely a workaround.

There's no way to scroll to the right, so it doesn't make much sense to not wrap text. :+1:

altsem avatar Nov 01 '24 16:11 altsem

@altsem I was thinking about this again, in the context of the recent UI code changes (which I haven't had much chance to look through.) I noticed one of the things mentioned in the commit was that it should make wrapping easier?

Do you have any high-level thoughts on how?

jonathanj avatar Nov 13 '25 06:11 jonathanj

@jonathanj I've been thinking a lot, but haven't really concluded what is best here. But I put some thoughts and a PoC where I left off on a draft: https://github.com/altsem/gitu/pull/455

altsem avatar Nov 13 '25 18:11 altsem