diff options
| author | sigoden <sigoden@gmail.com> | 2023-03-08 13:44:37 +0800 |
|---|---|---|
| committer | sigoden <sigoden@gmail.com> | 2023-03-08 13:58:50 +0800 |
| commit | 4e729db237dbfb93d32bfa43b60a09be07d49630 (patch) | |
| tree | bbcc051e653d29b4b8f2fe3406f486e1cdfd2917 /src/repl | |
| parent | f694a59dccef877a026c043cee236f57a93033a6 (diff) | |
| download | aichat-4e729db237dbfb93d32bfa43b60a09be07d49630.tar.gz | |
chore: optimize output newline
Diffstat (limited to 'src/repl')
| -rw-r--r-- | src/repl/handler.rs | 6 |
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") } } } |
