Skip to content

Hunk navigation centers first line instead of entire hunk #82

Closed

Description

@p4elkin

When navigating between hunks with [ / ], the viewport centers on the first changed line of the target hunk. This wastes the top half of the screen on context that's already been read, and small hunks end up with the changed lines clustered at the center with no visibility of what follows.

Expected behavior: The entire hunk should be centered in the viewport. For small hunks, this means the midpoint of the hunk lands at the viewport center. For large hunks that exceed the viewport height, the first line should be placed near the top with a small context margin.

Example

Before:
Image

After:
image

Activity

  1. added 2 commits that reference this issue on Apr 9, 2026
    55349fb
    35edef3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions