lazyjj icon indicating copy to clipboard operation
lazyjj copied to clipboard

Everything is underlined in diff view

Open fr-joseph opened this issue 1 year ago • 6 comments

Hello!

How can I get rid of the excess underlines in the diff view? What am I doing wrong?

It happens in both diff variants (color words and git diff). I've tried on X and Wayland. I've tried different terminal emulators (foot, kitty, wezterm, alacritty). I've tried with a few different fonts.

Thank you!

lazyjj-underlines-comp

fr-joseph avatar Oct 21 '24 11:10 fr-joseph

~~Could you share your jj config?~~ I have this in mine

[colors]
# do not underline lines in hunks (since 0.19)
"diff removed token" = { underline = false }
"diff added token" = { underline = false }

and lazyjj doesn't underline in diff, but if I comment these lines out, behavior the same as on your screenshot

upd. Okay, jj doesn't underline without this, strange

istudyatuni avatar Oct 26 '24 08:10 istudyatuni

@istudyatuni , adding the [colors] config fixed it. Thank you!

Feel free to close this.

fr-joseph avatar Oct 26 '24 12:10 fr-joseph

Feel free to close this.

I can't, but you can because you are the author of the issue

istudyatuni avatar Oct 26 '24 16:10 istudyatuni

Hmm, I changed my mind. I'm not really satisfied with disabling all the underlines. Is it possible to replicate the way that plain jj underlines the diff view?

The underlines are very useful for when spaces get added or removed. Hopefully this new example makes it easier to see, where the indentation changes after adding the surrounding if block.

lazyjj_underlines_example2

fr-joseph avatar Oct 26 '24 19:10 fr-joseph

I can replicate this as well. I have found the issue (reset bug in ansi-to-tui) and opened a PR: https://github.com/ratatui/ansi-to-tui/pull/57

Cretezy avatar Feb 15 '25 20:02 Cretezy

Image

Fixed in v0.5.0 using fork (but not in cargo version)

Cretezy avatar Feb 15 '25 20:02 Cretezy