Skip to content

[Feature]: F7/Shift+F7 diff-change navigation crosses into the next/previous changed file #10353

Description

@pythonstrup

Problem or use case

When reviewing changes, F7 / Shift+F7 walk through the diff hunks within a single file, but stop at the file boundary. At the last change in a file, F7 wraps back to that same file's first change instead of continuing the review into the next changed file.

Reviewing a multi-file change therefore means repeatedly returning to the Source Control panel to hand-pick the next file, which breaks the keyboard-only review flow. VS Code and JetBrains both continue diff-change navigation into the next/previous changed file.

Proposed solution

At the last change in a file, F7 opens the next changed file (and Shift+F7 the previous one), landing on that file's first change so the review keeps flowing without touching the mouse.

  • Traversal order follows exactly what the Source Control panel shows — staged/unstaged split, tree/list view, and any active filters.
  • When there is no adjacent changed file (or the Source Control panel is unmounted), it falls back to the existing same-file wrap, so nothing regresses.
  • The header's prev/next-change buttons share the same handler, so they cross files too.

Alternatives or additional context

Activity

  1. pkhetrapal commented on Sep 10, 2026

    @pkhetrapal

    I'm working on this in branch feat/worktree-diff-file-navigation. The implementation keeps the existing F7/Shift+F7 and header controls, extends them across eligible worktree diff files, and follows Source Control's displayed section order.

  2. pkhetrapal commented on Sep 10, 2026

    @pkhetrapal

    Draft PR opened for this: #19909

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

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions