grid: writing over half of a wide cluster loses text #11
Labels
No labels
Area/ci
Area/cli
Area/client
Area/client-core
Area/daemon
Area/deps
Area/docs
Area/grid
Area/manual
Area/nix
Area/protocol
Area/pty
Area/render
Area/shaping
Area/skills
Area/transport
Area/vt
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Performance
Kind/Security
Kind/Testing
perf-regression-accepted
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Blocked
Status
Need More Info
Status
Upstream
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
felis-terminal/felis#11
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?
Several grid paths recognize only a bare
Grapheme::Charas the owner of a wide pair, never aGrapheme::Cluster, so a multi-codepoint wide grapheme (VS16 emoji, flag, ZWJ sequence, CJK + combining mark) is not cleaned up when half of it is overwritten or erased. kitty, WezTerm and Alacritty render all repros below correctly.Repros (8-column grid,
·= Empty,_= Spacer):printf '❄️ x\r❄️ x'→·| |x|x, cursor col 3; expected❄️|_| |x, cursor col 4. Same for🇯🇵,❤️, keycaps.widen_cluster_if_needed(crates/felis-grid/src/editing.rs~523) only claims anEmptytrailing cell, so the stale Spacer blocks the widen, the cursor is not advanced, and the next print evicts the emoji.printf '👩💻z\rXY'→·|Y|z; expectedX|Y|z. Same with CUP onto the cluster.\e[1;1;1;1$z), DECFRA leave·|_.❤️\e[2b→ narrow❤❤(last_printedis not set on a fold).Where:
evict_wide_partner_at/needs_right_evict(editing.rs~660),store_ascii_run(sink.rs~82),range_blank_innerto - 1check (editing.rs~715).Knock-on:
push_cell_textemits nothing for a Spacer, so capture, search and selection drop a column over the orphan.probeto grid: writing over half of a wide cluster loses text