1
0
mirror of https://github.com/Tha14/toxic.git synced 2025-07-01 06:16:44 +02:00

Make wide character support optional

Issue #514. FindCursesw modified to make it simpler. Wide character
can be disable by passing NO_WIDECHAR=ON.
This commit is contained in:
Manuel Argüelles
2013-08-22 15:57:34 -05:00
committed by Sergey 'Jin' Bostandzhyan
parent 30666d2deb
commit 1087bbb4ff
4 changed files with 8 additions and 2 deletions

View File

@ -182,7 +182,11 @@ static void chat_onKey(ToxWindow *self, Messenger *m, wint_t key)
getmaxyx(self->window, y2, x2);
/* Add printable chars to buffer and print on input space */
#if HAVE_WIDECHAR
if (iswprint(key)) {
#else
if (isprint(key)) {
#endif
if (ctx->pos != sizeof(ctx->line) - 1) {
mvwaddstr(self->window, y, x, wc_to_char(key));
ctx->line[ctx->pos++] = key;