Skip to content

Allow commit hunk jumping from the metadata section#1988

Open
micampe wants to merge 1 commit into
NeogitOrg:masterfrom
micampe:commit-hunk-navigation
Open

Allow commit hunk jumping from the metadata section#1988
micampe wants to merge 1 commit into
NeogitOrg:masterfrom
micampe:commit-hunk-navigation

Conversation

@micampe

@micampe micampe commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

This change allows pressing } when opening a commit to jump directly to the first hunk from the metadata section at the top. Previously the {/} keymaps only worked when the cursor was already within the diff portion of the commit.

Also, { jumps back to the metadata section from the first hunk.

This behavior matches how Previous/NextSection work in the status view.

Refactored the } implementation to mirror how { is defined for clarity.

This change allows pressing } when opening a commit to jump directly to
the first hunk from the metadata section at the top. Previously the {/}
keymaps only worked when the cursor was already within the diff portion
of the commit.

Also, { jumps back to the metadata section from the first hunk.

This behavior matches how Previous/NextSection work in the status view.

Refactored the } implementation to mirror how { is defined for clarity.
@micampe

micampe commented Jul 13, 2026

Copy link
Copy Markdown
Contributor Author

oops, I didn't notice #1987 had already been submitted... I guess you'll just have to pick which implementation you prefer :D

if that one is preferred I think { also needs to be fixed (trivial, can use that portion of my patch).
I would update both keymaps to use find_component but that's just stylistic.

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.

1 participant