summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'readline.c')
-rw-r--r--readline.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/readline.c b/readline.c
index 1868b1082..9c4b68b53 100644
--- a/readline.c
+++ b/readline.c
@@ -444,6 +444,11 @@ void readline_start(ReadLineState *rs, const char *prompt, int read_password,
rs->readline_func = readline_func;
rs->readline_opaque = opaque;
rs->read_password = read_password;
+ readline_restart(rs);
+}
+
+void readline_restart(ReadLineState *rs)
+{
rs->cmd_buf_index = 0;
rs->cmd_buf_size = 0;
}