fix: display double width (CJK) characters.

Signed-off-by: Ilia Maslakov <il.smind@google.com>
This commit is contained in:
Ilia Maslakov 2009-10-20 19:38:35 +00:00
parent 20cd37d751
commit dfb0040c5b
2 changed files with 8 additions and 0 deletions

View File

@ -180,6 +180,10 @@ mcview_display_nroff (mcview_t * view)
#endif
tty_print_anychar (c);
}
#ifdef HAVE_CHARSET
if (view->utf8 && g_unichar_iswide(c))
col++;
#endif
col++;
tty_setcolor (NORMAL_COLOR);
}

View File

@ -151,6 +151,10 @@ mcview_display_text (mcview_t * view)
#endif
tty_print_anychar (c);
}
#ifdef HAVE_CHARSET
if (view->utf8 && g_unichar_iswide(c))
col++;
#endif
col++;
tty_setcolor (NORMAL_COLOR);
}