Skip to content

fix(navigation): default cycle_hunks_across_files to false (#412)#415

Merged
esmuellert merged 1 commit into
mainfrom
fix/cycle-hunks-across-files-default-off
Jun 10, 2026
Merged

fix(navigation): default cycle_hunks_across_files to false (#412)#415
esmuellert merged 1 commit into
mainfrom
fix/cycle-hunks-across-files-default-off

Conversation

@esmuellert

Copy link
Copy Markdown
Owner

Summary

Fixes #412. PR #410 introduced the cycle_hunks_across_files option but accidentally set its default to true, silently changing the behavior of ]c / [c so that pressing them on the last hunk of a file would jump to the next file instead of cycling within the current file.

This restores the legacy / vim-diff behavior as the default. Users who want cross-file cycling can opt in:

diff = {
  cycle_hunks_across_files = true,
}

Changes

  • lua/codediff/config.lua: default flipped to false
  • README.md: updated documented default
  • doc/codediff.txt: updated documented default

Test plan

  • Existing tests in tests/ui/view/cycle_hunks_across_files_spec.lua already set the option explicitly per case, so both ON and OFF paths remain covered.
  • No production logic changed — only the default value.

🤖 Generated with Claude Code

PR #410 introduced cycle_hunks_across_files but set the default to true,
unexpectedly changing ]c/[c to jump across files at the boundary. Restore
the legacy behavior (stay within current file) by defaulting to false;
users who want cross-file cycling can opt in.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@esmuellert esmuellert enabled auto-merge June 10, 2026 20:10
@esmuellert esmuellert merged commit 41ab5b5 into main Jun 10, 2026
13 checks passed
@esmuellert esmuellert deleted the fix/cycle-hunks-across-files-default-off branch June 21, 2026 06:19
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

1 participant