Module Name: src Committed By: christos Date: Sat Jan 29 20:52:45 UTC 2022
Modified Files: src/lib/libedit: readline.c Log Message: 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. To generate a diff of this commit: cvs rdiff -u -r1.169 -r1.170 src/lib/libedit/readline.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/readline.c diff -u src/lib/libedit/readline.c:1.169 src/lib/libedit/readline.c:1.170 --- src/lib/libedit/readline.c:1.169 Tue Jan 11 13:30:15 2022 +++ src/lib/libedit/readline.c Sat Jan 29 15:52:45 2022 @@ -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 @@ rl_callback_read_char(void) wbuf = NULL; (*(void (*)(const char *))rl_linefunc)(wbuf); } + _rl_update_pos(); } void @@ -2176,6 +2177,7 @@ rl_redisplay(void) 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 @@ rl_message(const char *format, ...) va_end(args); rl_set_prompt(msg); - rl_redisplay(); + rl_forced_update_display(); } void