JetpackDuba / Gitnuro

A FOSS Git multiplatform client for newbies and pros
https://gitnuro.com/
GNU General Public License v3.0
946 stars 46 forks source link

Highlight changes within a line in diff #131

Open Compizfox opened 1 year ago

Compizfox commented 1 year ago

Is your feature request related to a problem? Please describe. When only small changes within a line occur, it is hard to spot them in a normal diff.

Describe the solution you'd like Add support for diffing changed characters within a line, like git diff --color-words.

What would be even better is to keep the change on separate lines, but highlight the changed characters within the line.

See this thread for an overview of the different methods.

JetpackDuba commented 1 year ago

Thanks for your suggestion!

Given that JGit does not provide such utility, seems like a line by line comparison would be ideal. Google has a library which may be useful https://github.com/google/diff-match-patch

I'll look into it in the future (probably for v1.5) as I'm interested in the feature myself.

julius-boettger commented 3 months ago

This would be a big quality of life improvement for me. I like the way Github does it, highlighting the changed part of a line with a stronger color, e.g.

Meanwhile in Gitnuro, the difference is pretty hard to spot.

JetpackDuba commented 2 days ago

Adressing this issue will be part of v1.5.0 as it's work in progress.

julius-boettger commented 2 days ago

That's great news! I'm excited to try it out when it's ready.