From f898b22b552a101724f1aa2275c6e19f7f2e9777 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=20Grythe=20St=C3=B8dle?= Date: Thu, 19 Dec 2019 23:56:30 +0100 Subject: [PATCH] fix: Clear before printing prompt (#739) This clears any leftover text when the prompt updates in-place (e.g. Alt + Left/Right in fish shell) --- src/print.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/print.rs b/src/print.rs index 925c1a02..70826827 100644 --- a/src/print.rs +++ b/src/print.rs @@ -24,6 +24,8 @@ pub fn get_prompt(context: Context) -> String { writeln!(buf).unwrap(); } + buf.push_str("\x1b[J"); + let mut prompt_order: Vec<&str> = Vec::new(); // Write out a custom prompt order