commit ba5b12c1fa543ebbbdbf3f9ab98d6e88aad3c350
parent 40ea2a2ea085bef9732252dccc9f6861b0ce6bb8
Author: David Lawrence Ramsey <pooka109@gmail.com>
Date: Wed, 16 Mar 2005 16:40:21 +0000
comment clarifications
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2380 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
Diffstat:
2 files changed, 8 insertions(+), 4 deletions(-)
diff --git 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
@@ -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))) {