Add all lines read from a terminal to history.

This commit is contained in:
Condorra 2024-08-17 21:49:32 +10:00
parent 972b7c0cab
commit aa164087fa

View File

@ -358,6 +358,9 @@ impl LineState {
self.move_cursor(-100000)?; self.move_cursor(-100000)?;
self.clear_and_render(term)?; self.clear_and_render(term)?;
// Add to history...
self.history.entries.push_front(line.clone());
// Return line // Return line
return Ok(Some(ReadlineEvent::Line(line))); return Ok(Some(ReadlineEvent::Line(line)));
} }