diff options
author | Samuel Mendoza-Jonas <sam@mendozajonas.com> | 2017-10-10 15:36:27 +1100 |
---|---|---|
committer | Samuel Mendoza-Jonas <sam@mendozajonas.com> | 2017-10-11 11:53:26 +1100 |
commit | eac7fc04e7ce07f6b1a6a0d19af86ae7f74ebc5e (patch) | |
tree | 60a5614cf374584bbe7106d186ae662ab5fc5934 /test/parser | |
parent | e1e2ca689661791ba38bf2572df8a65e36258ac2 (diff) | |
download | talos-petitboot-eac7fc04e7ce07f6b1a6a0d19af86ae7f74ebc5e.tar.gz talos-petitboot-eac7fc04e7ce07f6b1a6a0d19af86ae7f74ebc5e.zip |
ui/ncurses: Display multibyte strings correctly in textscreens
In nc-textscreen each line of text is capped at a certain length to
avoid running off the side of the viewable screen. However it appears
the ncurses function mvwaddnstr() counts by byte instead of actual
character, causing strings which contain multibyte characters to be cut
short.
To avoid this check the displayed length of each string against the
screen width, and if under instruct mvwaddnstr() to print the whole
string.
Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
Diffstat (limited to 'test/parser')
0 files changed, 0 insertions, 0 deletions