summaryrefslogtreecommitdiffstats
path: root/src/repl/handler.rs
diff options
context:
space:
mode:
authorsigoden <sigoden@gmail.com>2023-03-08 13:44:37 +0800
committersigoden <sigoden@gmail.com>2023-03-08 13:58:50 +0800
commit4e729db237dbfb93d32bfa43b60a09be07d49630 (patch)
treebbcc051e653d29b4b8f2fe3406f486e1cdfd2917 /src/repl/handler.rs
parentf694a59dccef877a026c043cee236f57a93033a6 (diff)
downloadaichat-4e729db237dbfb93d32bfa43b60a09be07d49630.tar.gz
chore: optimize output newline
Diffstat (limited to 'src/repl/handler.rs')
-rw-r--r--src/repl/handler.rs6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/repl/handler.rs b/src/repl/handler.rs
index dddd531..5959cd6 100644
--- a/src/repl/handler.rs
+++ b/src/repl/handler.rs
@@ -128,10 +128,8 @@ impl ReplyStreamHandler {
let _ = tx.send(ReplyStreamEvent::Done);
}
None => {
- if self.buffer.ends_with('\n') {
- print_now!("\n");
- } else {
- print_now!("\n\n");
+ if !self.buffer.ends_with('\n') {
+ print_now!("\n")
}
}
}