Source-Changes-HG archive

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

[src/trunk]: src/lib/libedit Add more refreshes from Walter Lozano. The readl...



details:   https://anonhg.NetBSD.org/src/rev/fa2084889970
branches:  trunk
changeset: 359899:fa2084889970
user:      christos <christos%NetBSD.org@localhost>
date:      Sat Jan 29 20:52:45 2022 +0000

description:
Add more refreshes from Walter Lozano. The readline example in
http://www.mcld.co.uk/blog/2009/simple-gnu-readline-callback-style-example.html
still does not work, but it is better.

diffstat:

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

diffs (43 lines):

diff -r 2369509b45c9 -r fa2084889970 lib/libedit/readline.c
--- a/lib/libedit/readline.c    Sat Jan 29 20:35:11 2022 +0000
+++ b/lib/libedit/readline.c    Sat Jan 29 20:52:45 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: readline.c,v 1.169 2022/01/11 18:30:15 christos Exp $  */
+/*     $NetBSD: readline.c,v 1.170 2022/01/29 20:52:45 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.169 2022/01/11 18:30:15 christos Exp $");
+__RCSID("$NetBSD: readline.c,v 1.170 2022/01/29 20:52:45 christos Exp $");
 #endif /* not lint && not SCCSID */
 
 #include <sys/types.h>
@@ -2149,6 +2149,7 @@
                        wbuf = NULL;
                (*(void (*)(const char *))rl_linefunc)(wbuf);
        }
+       _rl_update_pos();
 }
 
 void
@@ -2176,6 +2177,7 @@
        a[0] = (char)e->el_tty.t_c[TS_IO][C_REPRINT];
        a[1] = '\0';
        el_push(e, a);
+       rl_forced_update_display();
 }
 
 int
@@ -2355,7 +2357,7 @@
        va_end(args);
 
        rl_set_prompt(msg);
-       rl_redisplay();
+       rl_forced_update_display();
 }
 
 void



Home | Main Index | Thread Index | Old Index