Skip to content

feature: jump to next unmarked file when marking - #378

Open
florian-lackner365 wants to merge 1 commit into
dlyongemallo:mainfrom
florian-lackner365:feat/jump-to-next-unmarked
Open

florian-lackner365 wants to merge 1 commit into
dlyongemallo:mainfrom
florian-lackner365:feat/jump-to-next-unmarked

Conversation

@florian-lackner365

Copy link
Copy Markdown

Hello friends!

Let me start by saying thank you for this awesome plugin. It's my daily driver for code review.

I often find myself reviewing the file list from the bottom up. I'm using w to mark reviewed files as I go. Whenever I mark a file this way, the cursor jumps to the line after the marked file. Since I'm doing it bottom-up, I have to go up two lines every time.

This PR implements a smarter logic: Jump to the closest unmarked file, preferring going down.

This keeps the base use-case functional while also supporting mine.

What do you think? Feel free to just close the PR if you don't feel like having it in main 👍

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The navigation documentation overstates the modes covered, and the new tests do not verify that a nearer file above wins over an available farther file below.

2 open issues
What changed in this PR

This PR improves bottom-up file review by navigating to the nearest unmarked file after marking an entry, preferring downward movement when distances tie.

Changes:

  • Adds nearest-unmarked navigation in normal mode when the hide-selected filter is disabled.
  • Refactors test stubs and adds cases for navigation, tie-breaking, and unmarking.
  • Documents the selection navigation behavior.
File Description
lua/​diffview/​tests/​functional/​hide_selected_navigation_spec.lua Adds navigation tests and a reusable panel stub.
lua/​diffview/​scene/​views/​diff/​listeners.lua Replaces next-entry movement with nearest-unmarked lookup.
doc/​diffview.txt Describes cursor behavior after marking and unmarking.

Review effort: Balanced

Comment thread doc/diffview.txt Resolved
this simplifies workflows where you're reviewing from the bottom up,
marking files as reviewed while you go.
@florian-lackner365
florian-lackner365 force-pushed the feat/jump-to-next-unmarked branch from 9360c7d to 6325a7e Compare November 16, 2026 09:39
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