Input taller than 65535 rows loses content silently #9
Labels
No labels
bug
design
docs
enhancement
good-first-issue
packaging
rendering
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
natsukium/spoor#9
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
main::grid_rowsclamps the grid height tou16::MAX, so an input with more than ~65 535 rowssilently loses its oldest content instead of saying so.
Detail
The doc comment states the intent: "Size the grid tall enough to hold all of stdin (plus slack for
wrapped lines) so no content scrolls out of reach before matching." Past 65 535 rows that
guarantee quietly stops holding —
source::screenreads rows0..rowsof the screen, soeverything that scrolled off the top is simply not scanned, and the user is told nothing. A
tmux capture-pane -S -on a long-lived pane, or acatof a big log, reaches this.Also note
wrap_slack = input.len() / colscounts bytes, so a UTF-8-heavy input over-estimatesthe slack and reaches the ceiling sooner than its display rows warrant.
Options
spoor: input truncated to the last N rowson stderr beats silence, and matchesthe project's habit of naming what was lost (the soft-wrap
--helpnote).Either way the current behaviour — a guarantee in a doc comment that the code drops without a
word — should not stand. Related: #5, which is about reaching content that is held.