FT-2 Keep the gap after a shortened scoped-view path #53

Merged
nelson merged 1 commit from ft-2-scoped-path-gap into main 2026-11-07 17:10:06 -08:00
Owner

Fixes https://openproject.romaine.life/wp/FT-2: in a scoped view, a path shortened with a leading … ran straight into the search hint or query. drawText placed each rune at its byte offset rather than its rune count, so the 3-byte … pushed everything after it two cells right, onto the gap; it wasn't the terminal measuring the character's width.

drawText now counts runes, which also fixes any other non-ASCII text it draws. A new test renders a deep scoped path and checks the gap before the query; it fails on main with the exact FP-1 line. Also checked in a real 90-column tmux pane against main.

Fixes https://openproject.romaine.life/wp/FT-2: in a scoped view, a path shortened with a leading `…` ran straight into the search hint or query. `drawText` placed each rune at its byte offset rather than its rune count, so the 3-byte `…` pushed everything after it two cells right, onto the gap; it wasn't the terminal measuring the character's width. `drawText` now counts runes, which also fixes any other non-ASCII text it draws. A new test renders a deep scoped path and checks the gap before the query; it fails on main with the exact FP-1 line. Also checked in a real 90-column tmux pane against main.
FT-2 Keep the gap after a shortened scoped-view path
All checks were successful
Build / windows (pull_request) Successful in 32s
Build / unix (pull_request) Successful in 1m10s
Build / pcs (pull_request) Has been skipped
Build / home-sync (pull_request) Successful in 0s
CI / test (pull_request) Successful in 1m13s
CI / dll (pull_request) Successful in 56s
29e1284274
drawText placed each rune at its byte offset, so the 3-byte ellipsis in
front of a shortened path pushed the rest two cells right, onto the gap
before the query.
nelson merged commit 47daec1f76 into main 2026-11-07 17:10:06 -08:00
nelson deleted branch ft-2-scoped-path-gap 2026-11-07 17:10:07 -08:00
Sign in to join this conversation.
No description provided.