grid: a table-GC sweep that compacts styles leaves the pen pointing at the wrong style #419
Labels
No labels
priority/P0
priority/P1
priority/P2
release/v0.1.0
status/blocked
status/planned
type/bug
type/design
type/test-gap
type/tracker
No milestone
No project
No assignees
1 participant
Due date
No due date set.
Dependencies
No dependencies set
Reference
natsukium/felis#419
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?
Found while implementing #409 (PR #418).
TableGc::maybe_sweep(crates/felis-grid/src/table_gc.rs) callsScreenBuffer::gc_stylesdirectly and discards itscompactedresult. The daemon'sParseCore::maybe_gc_tablesand the client shadow both sweep through it, so after a sweep that compacts the style table,Grid::pen_styleis never re-interned and keeps an id that now points at a different entry (or past the end, which resolves to the default pen).Reproduced on origin/main with a throwaway probe: text printed right after a daemon-path sweep lost its truecolor foreground (
Rgb(0,16,0)becameDefault).Expected: every sweep path re-interns the pen after a compaction, as
Grid::gc_stylesdoes. Pin it with a test that drivesTableGc::maybe_sweepinto a compaction and then prints with the previous pen.