diff --git a/src/reader.cpp b/src/reader.cpp index d72ba03ed..e179d8bc2 100644 --- a/src/reader.cpp +++ b/src/reader.cpp @@ -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);