Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libedit save and restore IGNORE_EXTCHARS like we do in t...



details:   https://anonhg.NetBSD.org/src/rev/1369b6177660
branches:  trunk
changeset: 336872:1369b6177660
user:      christos <christos%NetBSD.org@localhost>
date:      Tue Mar 24 21:26:50 2015 +0000

description:
save and restore IGNORE_EXTCHARS like we do in the getc case. From:
https://bugzilla.redhat.com/attachment.cgi?id=1001894

diffstat:

 lib/libedit/eln.c |  10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diffs (32 lines):

diff -r 736ac172067b -r 1369b6177660 lib/libedit/eln.c
--- a/lib/libedit/eln.c Tue Mar 24 21:09:11 2015 +0000
+++ b/lib/libedit/eln.c Tue Mar 24 21:26:50 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: eln.c,v 1.17 2014/06/18 18:12:28 christos Exp $        */
+/*     $NetBSD: eln.c,v 1.18 2015/03/24 21:26:50 christos Exp $        */
 
 /*-
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 #include "config.h"
 #if !defined(lint) && !defined(SCCSID)
-__RCSID("$NetBSD: eln.c,v 1.17 2014/06/18 18:12:28 christos Exp $");
+__RCSID("$NetBSD: eln.c,v 1.18 2015/03/24 21:26:50 christos Exp $");
 #endif /* not lint && not SCCSID */
 
 #include "histedit.h"
@@ -76,9 +76,11 @@
 {
        const wchar_t *tmp;
 
-       el->el_flags |= IGNORE_EXTCHARS;
+       if (!(el->el_flags & CHARSET_IS_UTF8))
+               el->el_flags |= IGNORE_EXTCHARS;
        tmp = el_wgets(el, nread);
-       el->el_flags &= ~IGNORE_EXTCHARS;
+       if (!(el->el_flags & CHARSET_IS_UTF8))
+               el->el_flags &= ~IGNORE_EXTCHARS;
        return ct_encode_string(tmp, &el->el_lgcyconv);
 }
 



Home | Main Index | Thread Index | Old Index