Fix crash on escape in complete-and-search pager

Reproduce with `: <Shift+Tab><Escape>`.
Introduced in 8a033b9f3 Add undo
This commit is contained in:
Johannes Altmanninger 2020-02-29 21:19:28 +01:00
parent 706c1a838e
commit 8eadef81a4

View File

@ -1963,7 +1963,9 @@ void reader_data_t::set_command_line_and_position(editable_line_t *el, wcstring
/// Undo the transient edit und update commandline accordingly.
void reader_data_t::clear_transient_edit() {
assert(command_line_has_transient_edit);
if (!command_line_has_transient_edit) {
return;
}
command_line.undo();
update_buff_pos(&command_line);
command_line_changed(&command_line);