From: David Lawrence Ramsey Date: Tue, 16 Nov 2004 22:51:07 +0000 (+0000) Subject: fix breakage of ASCII character sequence mode introduced with the UTF-8 X-Git-Tag: v1.3.5~17 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=0317c86a8a9a01f63743c47c03f3abf503603056;p=nano.git fix breakage of ASCII character sequence mode introduced with the UTF-8 sequence support git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2103 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- diff --git a/src/winio.c b/src/winio.c index 846bd444..ee55a6e4 100644 --- a/src/winio.c +++ b/src/winio.c @@ -171,10 +171,16 @@ int get_kbinput(WINDOW *win, bool *meta_key, bool *func_key) #endif ); + /* If we have a complete sequence now, we should interpret its + * translated value instead of the value of the last character + * we got. */ + if (retval != ERR) + kbinput = retval; + /* If we got a one-character sequence and it's outside the ASCII * range, set func_key to TRUE. */ if (seq == NO_SEQ) { - if (retval > 255) + if (kbinput > 255) *func_key = TRUE; /* If we got a multi-character sequence, read it in, including * the initial character, as verbatim input. */