Source-Changes-HG archive

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

[src/trunk]: src/lib/libedit rl_startup_hook should be called each time. From...



details:   https://anonhg.NetBSD.org/src/rev/8f23ead9a6c7
branches:  trunk
changeset: 1023475:8f23ead9a6c7
user:      christos <christos%NetBSD.org@localhost>
date:      Fri Sep 10 13:29:06 2021 +0000

description:
rl_startup_hook should be called each time. From Carlos Henrique Lima Melara

diffstat:

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

diffs (36 lines):

diff -r b9cda7f85b2e -r 8f23ead9a6c7 lib/libedit/readline.c
--- a/lib/libedit/readline.c    Thu Sep 09 23:26:36 2021 +0000
+++ b/lib/libedit/readline.c    Fri Sep 10 13:29:06 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: readline.c,v 1.166 2021/09/09 20:25:30 christos Exp $  */
+/*     $NetBSD: readline.c,v 1.167 2021/09/10 13:29:06 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.166 2021/09/09 20:25:30 christos Exp $");
+__RCSID("$NetBSD: readline.c,v 1.167 2021/09/10 13:29:06 christos Exp $");
 #endif /* not lint && not SCCSID */
 
 #include <sys/types.h>
@@ -123,7 +123,6 @@
 int _rl_print_completions_horizontally = 0;
 VFunction *rl_redisplay_function = NULL;
 Function *rl_startup_hook = NULL;
-int rl_did_startup_hook = 0;
 VFunction *rl_completion_display_matches_hook = NULL;
 VFunction *rl_prep_term_function = (VFunction *)rl_prep_terminal;
 VFunction *rl_deprep_term_function = (VFunction *)rl_deprep_terminal;
@@ -425,8 +424,7 @@
 
        if (e == NULL || h == NULL)
                rl_initialize();
-       if (rl_did_startup_hook == 0 && rl_startup_hook) {
-               rl_did_startup_hook = 1;
+       if (rl_startup_hook) {
                (*rl_startup_hook)(NULL, 0);
        }
        tty_init(e);



Home | Main Index | Thread Index | Old Index