delta icon indicating copy to clipboard operation
delta copied to clipboard

🐛 --navigate n/N jumps to next/prev hunk, not file?

Open carlpett opened this issue 10 months ago • 4 comments

Possibly a misunderstanding? But when I turn on navigation, do git diff and press n, the screen advances to the next hunk, even if it is in the same file.

I'm using delta 0.16.5, from Fedora repos. Running inside tmux on Alacritty, if that is relevant.

carlpett avatar Mar 24 '24 20:03 carlpett

Seeing the same in delta 0.17.0

jasonmobley avatar May 09 '24 18:05 jasonmobley

Just want to say that I sympathise with this! I also find that if I'm using navigate to jump, then by-hunk jumps often feel too small. So I'm open to interface design change proposals here.

A related variant is to increase our diff context, i.e. with git ... -U99 | delta or

[diff]
    context = 99

If we set that number large enough, then there are no within-file hunks any longer hence navigate jumps become by-file! Of course it can sometimes not be exactly what you want to have to scroll past large sections of unchanged content, but sometimes the lack of hunk breaks makes diffs easier to understand.

dandavison avatar Jun 03 '24 08:06 dandavison