diff --git a/src/history.rs b/src/history.rs index 46905e0..21e8f28 100644 --- a/src/history.rs +++ b/src/history.rs @@ -8,7 +8,11 @@ impl History { } pub fn add>(&mut self, event: S) { - self.events.push(event.into()); + let text = event.into(); + if text.is_empty() { + return; + } + self.events.push(text); } pub fn look_back(&self, idx: usize) -> Option<&str> {