forked from cmus/cmus
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix under-allocation when many zero-width characters are present (cmu…
…s#1152) ...by taking better advantage of gbufs, and using them only through the gbuf_* functions (for the most part). Previously we budgeted for an imagined worst case of 4 per printed column, which in fact is not the worst case when considering combining characters (which can be stacked). However this issue is very rare, almost theoretical, for a few reasons: - While zero-width characters are not accounted for at all, many other characters are significantly over-budgeted, e.g. every Latin character is over-accounted by 3 bytes. - Zero-width characters are relatively scarce, excepting "zalgo text". - gbufs only grow and are reused for the life of the program
- Loading branch information
Showing
6 changed files
with
223 additions
and
298 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.