Source-Changes-HG archive

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

[src/trunk]: src/lib/libedit PR/56370: mirabilos: libedit change from 2017 ki...



details:   https://anonhg.NetBSD.org/src/rev/073ce7c68a4c
branches:  trunk
changeset: 1023057:073ce7c68a4c
user:      christos <christos%NetBSD.org@localhost>
date:      Sat Aug 21 12:38:56 2021 +0000

description:
PR/56370: mirabilos: libedit change from 2017 kills history in gdb

diffstat:

 lib/libedit/readline.c |  9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diffs (45 lines):

diff -r 6ae2a59c49b6 -r 073ce7c68a4c lib/libedit/readline.c
--- a/lib/libedit/readline.c    Sat Aug 21 12:34:59 2021 +0000
+++ b/lib/libedit/readline.c    Sat Aug 21 12:38:56 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: readline.c,v 1.163 2021/08/21 12:34:59 christos Exp $  */
+/*     $NetBSD: readline.c,v 1.164 2021/08/21 12:38:56 christos Exp $  */
 
 /*-
  * Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include "config.h"
 #if !defined(lint) && !defined(SCCSID)
-__RCSID("$NetBSD: readline.c,v 1.163 2021/08/21 12:34:59 christos Exp $");
+__RCSID("$NetBSD: readline.c,v 1.164 2021/08/21 12:38:56 christos Exp $");
 #endif /* not lint && not SCCSID */
 
 #include <sys/types.h>
@@ -2078,6 +2078,7 @@
        const char *buf = el_gets(e, &count);
        char *wbuf;
 
+       el_set(e, EL_UNBUFFERED, 1);
        if (buf == NULL || count-- <= 0)
                return;
        if (count == 0 && buf[0] == e->el_tty.t_c[TS_IO][C_EOF])
@@ -2093,7 +2094,6 @@
                } else
                        wbuf = NULL;
                (*(void (*)(const char *))rl_linefunc)(wbuf);
-               el_set(e, EL_UNBUFFERED, 1);
        }
 }
 
@@ -2111,9 +2111,8 @@
 void
 rl_callback_handler_remove(void)
 {
+       el_set(e, EL_UNBUFFERED, 0);
        rl_linefunc = NULL;
-       el_end(e);
-       e = NULL;
 }
 
 void



Home | Main Index | Thread Index | Old Index