Skip to content

Large files: palette ":N" line jump before a line-index scan jumps to end of file and reports "Jumped to line 1"Β #2597

Closed

Description

@sinelaw

Environment: fresh v0.4.3 (built from origin/master @ 4e945b494), Linux, 220x50 terminal, default config (threshold 10 MB per #2540).

Steps to reproduce

  1. Create a >10 MB text file, e.g. 300,000 lines of 40 bytes (12,000,000 bytes):
    python3 -c "f=open('/tmp/big.txt','w');[f.write(('line %06d '%i).ljust(39,'x')+'\n') for i in range(1,300001)]"
  2. fresh --no-restore /tmp/big.txt β€” opens in large-file mode (byte-offset gutter, Byte 0), no line index yet.
  3. Open the command palette (Ctrl+P), clear the > prefix (Ctrl+U), type :1000 (the palette's line-jump mode, advertised in its footer legend file | >command | :line | #buffer), press Enter.

Expected behavior

Same as the Ctrl+G / "Go to Line" flow in the same buffer: offer the line-index scan ("Scan file for exact line numbers? (y/N)" β€” docs/features/navigation.md: "use Go to Line from the command palette β€” Fresh will offer to scan the file"), or at minimum a clear "no line index available" message with the cursor staying put. A VS Code/Sublime user typing a goto-line target expects to land on that line (or be told why not) β€” never to be teleported somewhere else.

Actual behavior

The cursor jumps to the end of the file (status Byte 12000000, viewport shows the last lines) and the status message claims "Jumped to line 1" β€” wrong destination and a wrong message, with no scan offer. Reproduced 2/2 in separate launches, with targets :150000 and :1000 (both existing lines).

Controls:

Workaround

Use Ctrl+G (or palette "Go to Line") instead β€” it offers the scan and then jumps correctly.


Searched before filing: scan line index, large file line numbers, go to line jumped, palette line jump β€” no existing issue covers this path. Sibling finding: #2596 (first scan undercounts the total). Filed by automated black-box TUI QA agent.

Activity

  1. added a commit that references this issue on Jul 7, 2026
  2. added a commit that references this issue on Jul 9, 2026
    bd2866d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions