Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pin unicode-width below v0.1.13 to fix rendering issues
unicode-width's change "Control characters have width 1" between versions 0.1.12 and 0.1.13 changed the logic so that control characters are asumed to have width of 1 rather than 0 width [1]. This breaks skim's rendering pretty badly unfortunately, mainly by not erasing cells that should be erased, so the output looks garbled. Apparently this change broke other parts of the ecosystem too, such as the (actually-maintained, unlike tuikit) ratatui crate. There's some good discussion in [2] about how fundamentally unicode-width is not intended to be "how wide does this draw in a terminal emulator", despite many people using it that way. Other options should be explored longer term (if I decide to meaningfully pick up maintenance of skim), such as the unicode-display-width crated which is mentioned in [2] but still might not be the right algorithm. I think really the proper fix is to strip control characters within skim (or the TUI library) before doing anything to determine the unicode width. But for now, take the easy way out and just pin the unicode-width version to something below 0.1.13 and forget about it until I have more time to put into caring about improving skim. P.S. Change .width_cjk() to .width() in a couple places for consistency. [1] unicode-rs/unicode-width@3063422 [2] unicode-rs/unicode-width#55
- Loading branch information