gitui icon indicating copy to clipboard operation
gitui copied to clipboard

Add option to show whitespace characters in diff

Open andresovela opened this issue 3 years ago • 5 comments

Is your feature request related to a problem? Please describe. It would be nice to be able to see whitespace characters in the diff panel. Sometimes I see stuff like this:

Screenshot from 2022-02-24 10-40-04

My IDE displays the whitespace characters like this:

Screenshot from 2022-02-24 10-41-04

Describe the solution you'd like An option to enable displaying whitespace characters.

Describe alternatives you've considered Maybe highlighting the parts of the line that changed could help.

andresovela avatar Feb 24 '22 09:02 andresovela

this makes sense eventually but is not high on my priority list since I want/need to rewrite the whole diffing from scratch eventually to support external diff crates and not using the libgit2 internal one

extrawurst avatar Oct 18 '22 12:10 extrawurst

@extrawurst Hi, truly an amazing project, and thank you for making it. I can click . for more options, type o for options, and then navigate to "Ignore whitespace" and change to true.

This works (!) thank you. But it only works for "Status [1]" view. But it does not work for "Log [2]" view after navigating to a commit.

I tried following https://github.com/extrawurst/gitui/blob/master/src/tabs/revlog.rs to find missing link of options. I see at https://github.com/extrawurst/gitui/blob/289eddd9beeffeb57ca3ae9f55380dd05996c23a/asyncgit/src/sync/commit_files.rs#L24 the options are not passed, but I do not know about the codebase.

Kamilcuk avatar Apr 18 '23 12:04 Kamilcuk

I can click . for more options, type o for options, and then navigate to "Ignore whitespace" and change to true.

This works (!) thank you. But it only works for "Status [1]" view. But it does not work for "Log [2]" view after navigating to a commit.

good catch but an entirely different topic. please feel free to create another issue (maybe we have one for it already?)

extrawurst avatar Apr 19 '23 11:04 extrawurst

Och, this issue is to show and not ignore the whitespaces. My bad, sorry.

Kamilcuk avatar Apr 19 '23 16:04 Kamilcuk

This issue has been automatically marked as stale because it has not had any activity half a year. It will be closed in 14 days if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Dec 15 '23 06:12 stale[bot]