moar icon indicating copy to clipboard operation
moar copied to clipboard

Moar does not display white space changes

Open alper opened this issue 1 year ago • 3 comments

I'm having a hard time finding something displaying whitespace changes in git diffs.

I run it like: GIT_PAGER=moar git diff

Then I get:

CleanShot 2024-10-02 at 12 46 16@2x

I already tried: -render-unprintable value=highlight

alper avatar Oct 02 '24 10:10 alper

Can you post the diff as well?

Just do git diff | cat and post the output here?

Or if the file contains invisible whitespace, maybe better to git diff > whitespace.diff and attach whitespace.diff here.

walles avatar Oct 02 '24 14:10 walles

Did you try https://github.com/walles/riff for highlighting this diff?

It's designed for making diffs more helpful.

If that doesn't show the white space change I'll need to know what actually changed to be able to do anything here.

And any change I make related to this is likely to be in riff.

walles avatar Oct 06 '24 06:10 walles

OK. Not sure why it's different on my home machine, but this is what I could reproduce:

pager=cat

CleanShot 2024-10-06 at 18 14 39@2x

pager=moar

CleanShot 2024-10-06 at 18 14 54@2x

pager=delta

CleanShot 2024-10-06 at 18 15 10@2x

So all three of them show the trailing space which is odd since I felt it was very hard on my work machine to get the trailing space to be displayed.

alper avatar Oct 06 '24 16:10 alper

I'm really at a loss regarding what to do here.

If this still repros on your work machine, are you running some other terminal there than at home? tmux or something like that?

Terminal differences is a possible (but not likely I'd say) explanation here.

I have run moar with multiple different terminals but I don't recall ever seeing this problem.

walles avatar Oct 26 '24 19:10 walles

I don't think anything needs to be done here. I'll check if I can reproduce it on the other machine and in the mean time close this ticket.

alper avatar Oct 27 '24 17:10 alper