Skip to content

Fix previous merge navigation at the first line - #1458

Open
hezhizhen wants to merge 1 commit into
jonas:masterfrom
hezhizhen:codex/fix-previous-merge-navigation
Open

hezhizhen wants to merge 1 commit into
jonas:masterfrom
hezhizhen:codex/fix-previous-merge-navigation

Conversation

@hezhizhen

Copy link
Copy Markdown
Contributor

With wrap-search = no, move-prev-merge fails to reach a merge on the first line of the main view. From the second commit, the cursor stays put because the reverse scan excludes index zero.

Include the first line in the reverse scan with a one-line boundary fix. Add a regression test covering that case, both non-wrapping boundaries, and previous/next merge navigation with wrapping enabled.

Validation:

  • The new regression fails on upstream 5a8fd507 and passes with this change.
  • Focused merge and search tests pass.
  • The full AddressSanitizer suite passes: 592 assertions in 157 tests (1 skipped because diff-highlight is unavailable).

With wrap-search disabled, the reverse scan excludes index zero and
misses a merge at the top of the main view. Include that boundary and
add coverage for merge navigation with and without wrapping.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants