Correctly handle CJK/double width characters.35/head
commit7b77965d98a2889fbe55bb2702c352812c833c6d
authorikji <ikji@protonmail.com>
Tue, 18 Sep 2018 05:33:33 +0000 (18 13:33 +0800)
committerikji <ikji@protonmail.com>
Tue, 18 Sep 2018 05:49:21 +0000 (18 13:49 +0800)
treef5c97f79660baac105fbc8d0eeffd862113cec63
parent8cd1f8b4ba7e65fdcbf0c6baa7dccb0eba557c12
Correctly handle CJK/double width characters.

Some CJK characters take more than more column on the terminal, so should use
wcswidth to calculate the screen width.  Also fixed potential buffer overflow
in calls to swprintf.
rover.c