summaryrefslogtreecommitdiffstats
path: root/src/repl/handler.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/repl/handler.rs')
-rw-r--r--src/repl/handler.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/repl/handler.rs b/src/repl/handler.rs
index a0b1e5c..2263ca2 100644
--- a/src/repl/handler.rs
+++ b/src/repl/handler.rs
@@ -121,6 +121,10 @@ impl ReplyStreamHandler {
}
pub fn text(&mut self, text: &str) -> Result<()> {
+ if self.buffer.is_empty() && text == "\n\n" {
+ return Ok(());
+ }
+ self.buffer.push_str(text);
match self.sender.as_ref() {
Some(tx) => {
let ret = tx
@@ -132,7 +136,6 @@ impl ReplyStreamHandler {
print_now!("{}", text);
}
}
- self.buffer.push_str(text);
Ok(())
}