From 16eba9baa10255c95e9d680e7f880f75b9bc03b1 Mon Sep 17 00:00:00 2001 From: sigoden Date: Thu, 2 Nov 2023 16:47:36 +0800 Subject: [PATCH] fix: incorrect last line render in command mode (#201) --- src/render/cmd.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/render/cmd.rs b/src/render/cmd.rs index a9eccdc8..75768b94 100644 --- a/src/render/cmd.rs +++ b/src/render/cmd.rs @@ -56,7 +56,9 @@ pub fn cmd_render_stream( } ReplyEvent::Done => { let input = format!("{}{buffer}", spaces(col)); - println!("{}", render.render(&input)); + let output = render.render(&input); + let output = &output[col..]; + println!("{}", output); break; } }