szn

Bug 211 — Overly broad emoji-presentation symbol width ranges in char_width.zig classify standard width-1 characters (✓, ✔, ★, ♥) as width-2, causing cursor drift and character remnants

211. Overly broad emoji-presentation symbol width ranges in char_width.zig classify standard width-1 characters (✓, ✔, ★, ♥) as width-2, causing cursor drift and character remnants

File: src/char_width.zig:555–570 Severity: HIGH Status: ✅ FIXED — split the broad 0x2600-0x26FF (Miscellaneous Symbols), 0x2700-0x27BF (Dingbats), and 0x2B00-0x2BFF (Miscellaneous Symbols and Arrows) blocks in emoji_presentation_ranges into precise, sorted sub-ranges containing only actual wide/emoji characters. This prevents U+2713 (✓), U+2714 (✔), and other standard text symbols from drifting the cursor. Added test coverage.

When a coding/build tool (like Svelte/Vite PWA builder during ninja build) outputs a standard U+2713 checkmark (✓) or a U+2714 heavy checkmark (✔), szn was classifying it as width-2 due to the broad range 0x2700-0x276D. Because the host terminal renders it as width-1, the host cursor ended up 1 column behind szn’s virtual cursor tracking (cur_cx). During subsequent line-clearing operations, szn wrote spaces to the host terminal offset by 1 column, leaving the actual rightmost characters (like double quotes " and dots .) untouched on the host screen. These remnants then persisted even after window switching because szn’s diff renderer (last_cells) believed they had already been successfully cleared to spaces.


NEW BUGS (2026-07-21 — status-bar / pane-border rework audit)

Found while re-checking commit 255f0ac8ba13 (“status bar: tmux-compatible configurable bar + format rework”). Four correctness bugs introduced by that commit, all now fixed.