Source-Changes-HG archive

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

[src/trunk]: src/lib/libedit If we did not setup the tty, don't reset it.



details:   https://anonhg.NetBSD.org/src/rev/922ad4c0c21b
branches:  trunk
changeset: 342138:922ad4c0c21b
user:      christos <christos%NetBSD.org@localhost>
date:      Tue Dec 08 12:57:16 2015 +0000

description:
If we did not setup the tty, don't reset it.

diffstat:

 lib/libedit/tty.c |  7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diffs (28 lines):

diff -r 179b16a1ad1a -r 922ad4c0c21b lib/libedit/tty.c
--- a/lib/libedit/tty.c Tue Dec 08 12:56:55 2015 +0000
+++ b/lib/libedit/tty.c Tue Dec 08 12:57:16 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: tty.c,v 1.47 2015/05/14 10:44:15 christos Exp $        */
+/*     $NetBSD: tty.c,v 1.48 2015/12/08 12:57:16 christos Exp $        */
 
 /*-
  * Copyright (c) 1992, 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = "@(#)tty.c      8.1 (Berkeley) 6/4/93";
 #else
-__RCSID("$NetBSD: tty.c,v 1.47 2015/05/14 10:44:15 christos Exp $");
+__RCSID("$NetBSD: tty.c,v 1.48 2015/12/08 12:57:16 christos Exp $");
 #endif
 #endif /* not lint && not SCCSID */
 
@@ -580,6 +580,9 @@
 /*ARGSUSED*/
 tty_end(EditLine *el)
 {
+       if (el->el_flags & EDIT_DISABLED)
+               return 0;
+
        if (tty_setty(el, TCSAFLUSH, &el->el_tty.t_or) == -1) {
 #ifdef DEBUG_TTY
                (void) fprintf(el->el_errfile,



Home | Main Index | Thread Index | Old Index