Skip to content

Default cycle_hunks_across_files to false for ]c/[c boundary navigation#414

Closed
esmuellert with Copilot wants to merge 3 commits into
mainfrom
copilot/fix-cycle-hunks-across-files
Closed

Default cycle_hunks_across_files to false for ]c/[c boundary navigation#414
esmuellert with Copilot wants to merge 3 commits into
mainfrom
copilot/fix-cycle-hunks-across-files

Conversation

Copilot AI commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

]c / [c navigation was crossing into adjacent files at hunk boundaries by default, which changed expected per-file wrap behavior. This PR restores the default so hunk navigation stays within the current file unless cross-file cycling is explicitly enabled.

  • Behavior change (default config)

    • Updated diff.cycle_hunks_across_files default from true to false in runtime config.
    • Result: at first/last hunk, [c/]c wrap within the same file by default.
  • Documentation alignment

    • Updated option defaults in README.md and doc/codediff.txt to reflect cycle_hunks_across_files = false.
  • Regression test adjustment

    • Updated the existing cycle_hunks_across_files spec to assert default-off behavior directly (instead of forcing false in test setup), preserving explicit ON-path coverage.
diff = {
  cycle_next_hunk = true,
  cycle_hunks_across_files = false, -- default: stay within file for ]c/[c
}

Copilot AI linked an issue Jun 10, 2026 that may be closed by this pull request
Copilot AI and others added 2 commits June 10, 2026 18:58
Co-authored-by: esmuellert <41042490+esmuellert@users.noreply.github.com>
Co-authored-by: esmuellert <41042490+esmuellert@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix cycle hunks across files setting Default cycle_hunks_across_files to false for ]c/[c boundary navigation Jun 10, 2026
Copilot AI requested a review from esmuellert June 10, 2026 19:04
@esmuellert

Copy link
Copy Markdown
Owner

@copilot what are thousand of files changed? I just need ONE word change

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.

[c and ]c jumps between files

2 participants