Skip to content

Conversation

@NicholasBHubbard
Copy link

Hello. This PR adds a new variable diff-hl-next-previous-hunk-auto-recenter, that when set causes diff-hl-next-hunk and diff-hl-previous-hunk to automatically call recenter after moving the point.

In my configuration I use after advice on these functions to do this auto-recentering, but I thought it would be nicer if there was a diff-hl variable for this behavior.

Let me know if you think this is a good idea, and if there is anything you would like changed in this PR. Thanks!

@dgutov
Copy link
Owner

dgutov commented Nov 21, 2025

Hi!

Could this approach be a little problematic?

This function is also called from diff-hl-stage-current-hunk and diff-hl-revert-hunk, where I'm not sure if recentering is good or not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants