From bee3e15ea417b48d2644ad1772ff8f191b242c07 Mon Sep 17 00:00:00 2001 From: James Booth Date: Mon, 9 Nov 2015 00:34:17 +0000 Subject: [PATCH] Clear Readline undo list when autocompleting command history fixes #667 --- src/ui/inputwin.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ui/inputwin.c b/src/ui/inputwin.c index ac9fb477..caf5387e 100644 --- a/src/ui/inputwin.c +++ b/src/ui/inputwin.c @@ -434,7 +434,7 @@ _inp_rl_tab_handler(int count, int key) if ((strncmp(rl_line_buffer, "/", 1) != 0) && (current->type == WIN_MUC)) { char *result = muc_autocomplete(current, rl_line_buffer); if (result) { - rl_replace_line(result, 0); + rl_replace_line(result, 1); rl_point = rl_end; free(result); } @@ -442,7 +442,7 @@ _inp_rl_tab_handler(int count, int key) ProfWin *window = wins_get_current(); char *result = cmd_autocomplete(window, rl_line_buffer); if (result) { - rl_replace_line(result, 0); + rl_replace_line(result, 1); rl_point = rl_end; free(result); }