1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-12-04 14:46:46 -05:00

Clear Readline undo list when autocompleting command history

fixes #667
This commit is contained in:
James Booth 2015-11-09 00:34:17 +00:00
parent 6feaa12253
commit bee3e15ea4

View File

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