aboutsummaryrefslogtreecommitdiff
path: root/sys/teken/demo/teken_demo.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/teken/demo/teken_demo.c')
-rw-r--r--sys/teken/demo/teken_demo.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/teken/demo/teken_demo.c b/sys/teken/demo/teken_demo.c
index 16bb4b7b198a..08323dc1a400 100644
--- a/sys/teken/demo/teken_demo.c
+++ b/sys/teken/demo/teken_demo.c
@@ -86,9 +86,10 @@ printchar(const teken_pos_t *p)
assert(p->tp_row < NROWS);
assert(p->tp_col < NCOLS);
- getyx(stdscr, y, x);
-
px = &buffer[p->tp_col][p->tp_row];
+ /* No need to print right hand side of CJK character manually. */
+ if (px->a.ta_format & TF_CJK_RIGHT)
+ return;
/* Convert Unicode to UTF-8. */
if (px->c < 0x80) {
@@ -118,8 +119,8 @@ printchar(const teken_pos_t *p)
bkgdset(attr | COLOR_PAIR(teken_256to8(px->a.ta_fgcolor) +
8 * teken_256to8(px->a.ta_bgcolor)));
+ getyx(stdscr, y, x);
mvaddstr(p->tp_row, p->tp_col, str);
-
move(y, x);
}