Actually end history search

Fixes #5818.
This commit is contained in:
Fabian Homborg 2019-05-24 19:01:24 +02:00
parent d0bd238657
commit dd4e0a3b6d

View file

@ -3267,8 +3267,13 @@ maybe_t<wcstring> reader_data_t::readline(int nchars_or_0) {
handle_readline_command(readline_cmd, rls);
if (command_ends_history_search(readline_cmd)) {
history_search.reset();
if (history_search.active()) {
history_search.go_to_end();
update_command_line_from_history_search();
history_search.reset();
}
}
rls.last_cmd = readline_cmd;
} else {
// Ordinary char.