gitstack
Commit f5c4510 RepoCommits

fix: stop input dropping a wide glyph at the right viewport edge

displayText wrote a 2-column cluster in full whenever its start was inside the
window, with no handling for a glyph whose right half fell outside. The returned
string then exceeded the box width and was clip-dropped downstream, so a
CJK/emoji glyph landing on the last visible column (cursor at the head of long
content, scroll 0) silently vanished.

Add the symmetric right-edge straddle case mirroring the existing left-edge one:
pad the visible columns instead of writing the whole cluster.

The regression test asserts displayText never exceeds the viewport width and the
unfittable glyph is omitted whole rather than clip-dropped.
grindlemire · Jun 19 · f5c4510 · parent 2161ca1 · 2 files +48 -0