Skip to content

Unable to open a file at a specific line number #1741

Description

@bacforsyth

lnav version
v0.14.0

Describe the bug
Unable to instruct lnav to open a file scrolled to a particular line with either the file:linenumber method i've seen mentioned or with -c ":goto line number"

This may be specific to a log format and file size as I am able to go to a specific line for a plain text file with lnav file:linenumber. I can't share the specific file I'm having problems with right now so I will have to try crafting a specific test file for this later.

In the debug logs for the successful case I see:

2026-08-14T16:40:40.697751-07:00 D t0 lnav.cc:1982 initial rescan found 1 files
2026-08-14T16:40:40.697755-07:00 D t0 lnav.exec-phase.cc:44 phase completed: scan
2026-08-14T16:40:40.697822-07:00 I t0 [37896::rebuild_indexes-1] textfile_sub_source.cc:1775 file open request to jump to line: 10
2026-08-14T16:40:40.697830-07:00 I t0 [37896::rebuild_indexes-1] textfile_sub_source.cc:1793 /private/tmp/foobar.txt
2026-08-14T16:40:40.697834-07:00 I t0 [37896::rebuild_indexes-1] textfile_sub_source.cc:1795   setting requested selection: 10
2026-08-14T16:40:40.697838-07:00 I t0 [37896::rebuild_indexes-1] textfile_sub_source.cc:1797   actual top is now: 0
2026-08-14T16:40:40.697842-07:00 I t0 [37896::rebuild_indexes-1] textfile_sub_source.cc:1799   actual selection is now: 10

I don't see that on the failing case, i see this:

2026-08-14T16:41:36.321511-07:00 D t0 lnav.cc:1982 initial rescan found 1 files
2026-08-14T16:41:36.321515-07:00 D t0 lnav.exec-phase.cc:44 phase completed: scan
2026-08-14T16:41:36.321848-07:00 D t0 [38035::rebuild_indexes-1] logfile_sub_source.cc:1070 no time left, skipping /private/tmp/test.txt

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions