mirror of
https://github.com/Tha14/toxic.git
synced 2024-11-23 08:33:01 +01:00
Fixed incorrectly handled error check for longchars
This commit is contained in:
parent
b5cbd8e410
commit
e6c68143bd
@ -393,14 +393,15 @@ void draw_active_window(Tox *m)
|
|||||||
|
|
||||||
/* Handle input */
|
/* Handle input */
|
||||||
#ifdef HAVE_WIDECHAR
|
#ifdef HAVE_WIDECHAR
|
||||||
wget_wch(stdscr, &ch);
|
if (wget_wch(stdscr, &ch) == ERR)
|
||||||
#else
|
#else
|
||||||
ch = getch();
|
if ((ch = getch()) == ERR)
|
||||||
#endif
|
#endif
|
||||||
|
return;
|
||||||
|
|
||||||
if (ch == T_KEY_NEXT || ch == T_KEY_PREV) {
|
if (ch == T_KEY_NEXT || ch == T_KEY_PREV) {
|
||||||
set_next_window((int) ch);
|
set_next_window((int) ch);
|
||||||
} else if (ch != ERR) {
|
} else {
|
||||||
pthread_mutex_lock(&Winthread.lock);
|
pthread_mutex_lock(&Winthread.lock);
|
||||||
a->onKey(a, m, ch);
|
a->onKey(a, m, ch);
|
||||||
pthread_mutex_unlock(&Winthread.lock);
|
pthread_mutex_unlock(&Winthread.lock);
|
||||||
|
Loading…
Reference in New Issue
Block a user