From 313a8e260801f1cc04eeadc504ce5ff96ea5e21f Mon Sep 17 00:00:00 2001 From: Mark Pizzolato Date: Tue, 22 Mar 2016 18:41:50 -0700 Subject: [PATCH] SCP: Defer readline initialization until immediately before it will be used. On some platforms, readline seems to behave in unexpected ways if another file is already open when it is initialized. Fix: #291 --- scp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scp.c b/scp.c index 5bf19add..d496c98a 100644 --- a/scp.c +++ b/scp.c @@ -7107,7 +7107,7 @@ static readline_func p_readline = NULL; typedef void (*add_history_func)(const char *); static add_history_func p_add_history = NULL; -if (!initialized) { +if (prompt && (!initialized)) { initialized = 1; void *handle;