Skip to content

[BUG] render_results Line Number Display Off-by-One #198

@xyz080125

Description

@xyz080125

Project

vgrep

Description

In search_tui.rs line 244-245, the line numbers are displayed as r.start_line + 1 and r.end_line + 1. If start_line or end_line are already 1-indexed (depending on database storage), this would show incorrect line numbers.

Error Message

Debug Logs

System Information

OS: Any
Rust Version: 1.75+

Screenshots

No response

Steps to Reproduce

  1. Index a file with known content
  2. Search and note the line numbers displayed in TUI
  3. Compare with actual file line numbers

Expected Behavior

Line numbers should match the actual file lines

Actual Behavior

Line numbers may be off by one if the database already stores 1-indexed values

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingvalidValid issuevgrep

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions