Module Name: src Committed By: christos Date: Tue Mar 24 21:26:50 UTC 2015
Modified Files: src/lib/libedit: eln.c Log Message: save and restore IGNORE_EXTCHARS like we do in the getc case. From: https://bugzilla.redhat.com/attachment.cgi?id=1001894 To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/lib/libedit/eln.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/lib/libedit/eln.c diff -u src/lib/libedit/eln.c:1.17 src/lib/libedit/eln.c:1.18 --- src/lib/libedit/eln.c:1.17 Wed Jun 18 14:12:28 2014 +++ src/lib/libedit/eln.c Tue Mar 24 17:26:50 2015 @@ -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 @@ el_gets(EditLine *el, int *nread) { 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); }