Skip to content

Change diff line numbers to 1-based indexing - #799

Merged
max-sixty merged 2 commits into
mitsuhiko:masterfrom
max-sixty:line-number
Sep 3, 2025
Merged

max-sixty merged 2 commits into
mitsuhiko:masterfrom
max-sixty:line-number

Conversation

@max-sixty

Copy link
Copy Markdown
Collaborator

Summary

  • Changed snapshot diff line numbers from 0-based to 1-based indexing
  • Line numbers now start at 1 instead of 0, matching text editor conventions
  • Added functional test to verify the 1-based indexing behavior

Test plan

  • Added new functional test test_line_numbers_1_based that verifies line numbers are displayed as 1-based
  • All existing tests pass
  • Manual verification shows diffs with line numbers starting at 1

🤖 Generated with Claude Code

max-sixty and others added 2 commits September 3, 2025 08:11
The diff output now shows line numbers starting at 1 instead of 0,
making it consistent with how most text editors display line numbers.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Corrected footnote reference format from [1]: to [^1]: to match
the footnote reference style.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@max-sixty
max-sixty merged commit ae26e81 into mitsuhiko:master Sep 3, 2025
15 checks passed
@max-sixty
max-sixty deleted the line-number branch September 3, 2025 22:17
@max-sixty max-sixty mentioned this pull request Sep 4, 2025
1 of 2 tasks
max-sixty added a commit that referenced this pull request Sep 4, 2025
## Summary
- Updates CHANGELOG.md to move all unreleased changes into the 1.43.2
section
- Prepares for tagging version 1.43.2

## Changes included in 1.43.2
- Fix panics when `cargo metadata` fails to execute or parse (#798)
- Fix clippy `uninlined_format_args` lint warnings (#801)  
- Changed diff line numbers to 1-based indexing (#799)
- Preserve snapshot names with `INSTA_GLOB_FILTER` (#786)
- (Plus other changes already listed in the 1.43.2 section)

## Test plan
- [x] CHANGELOG.md updated with all recent changes
- [ ] Ready to tag as 1.43.2 after merge

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-authored-by: Claude <noreply@anthropic.com>
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.

1 participant