Skip to content

Conversation

@echobt
Copy link
Contributor

@echobt echobt commented Jan 21, 2026

This PR fixes a bug where line numbers in search results were displayed with an incorrect off-by-one offset.

The Issue

The TUI was adding +1 to start_line and end_line when displaying results. However, the database stores line numbers that are already appropriate for 0-indexed internal logic but when combined with the display logic it was causing confusion.

Fix

Removed the +1 addition in src/ui/search_tui.rs when formatting the line number string.

Verification

  • Verified that the codebase consistently uses 0-indexed line numbers internally.
  • Ran reproduction tests to confirm the behavior change.
  • Ran existing tests to ensure no regressions.

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