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
This commit is contained in:
Mark Pizzolato 2016-03-22 18:41:50 -07:00
parent beaabbc35b
commit 313a8e2608

2
scp.c
View file

@ -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;