From: David Lawrence Ramsey Date: Wed, 16 Mar 2005 16:40:21 +0000 (+0000) Subject: comment clarifications X-Git-Tag: v1.3.6~23 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=ba5b12c1fa543ebbbdbf3f9ab98d6e88aad3c350;p=nano.git comment clarifications git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2380 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- diff --git a/src/nano.c b/src/nano.c index 6cdf7bfe..9f57210e 100644 --- a/src/nano.c +++ b/src/nano.c @@ -3621,7 +3621,9 @@ int do_input(bool *meta_key, bool *func_key, bool *s_or_t, bool * input buffer if we're not. */ if (input != ERR && *s_or_t == FALSE && ( #ifdef NANO_WIDE - /* Keep non-ASCII control characters in UTF-8 mode. */ + /* Keep non-ASCII control characters if we're in UTF-8 + * mode, since they might be part of a UTF-8 + * sequence. */ (!ISSET(NO_UTF8) && !is_ascii_char(input)) || #endif !is_cntrl_char(input))) { @@ -3949,8 +3951,8 @@ int main(int argc, char **argv) #ifdef NANO_WIDE { /* If the locale set doesn't exist, or it exists but doesn't - * include the string "UTF-8", we shouldn't use UTF-8 - * support. */ + * include the string "UTF-8", we shouldn't go into UTF-8 + * mode. */ char *locale = setlocale(LC_ALL, ""); if (locale == NULL || (locale != NULL && diff --git a/src/winio.c b/src/winio.c index eb656a74..d8a9cbe0 100644 --- a/src/winio.c +++ b/src/winio.c @@ -1682,7 +1682,9 @@ int do_statusbar_input(bool *meta_key, bool *func_key, bool *s_or_t, * input buffer if we're not. */ if (input != ERR && *s_or_t == FALSE && ( #ifdef NANO_WIDE - /* Keep non-ASCII control characters in UTF-8 mode. */ + /* Keep non-ASCII control characters if we're in UTF-8 + * mode, since they might be part of a UTF-8 + * sequence. */ (!ISSET(NO_UTF8) && !is_ascii_char(input)) || #endif !is_cntrl_char(input))) {