diff options
author | Jon Grythe Stødle <jonstodle@outlook.com> | 2019-12-19 23:56:30 +0100 |
---|---|---|
committer | Matan Kushner <hello@matchai.me> | 2019-12-19 17:56:30 -0500 |
commit | f898b22b552a101724f1aa2275c6e19f7f2e9777 (patch) | |
tree | 968a29f216b301116f5fb87b98409cdaf5570b1b /src | |
parent | 6a2b0a67b0ad8143f223f7abc6562ac839875b88 (diff) |
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)
Diffstat (limited to 'src')
-rw-r--r-- | src/print.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/print.rs b/src/print.rs index 925c1a02e..70826827f 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 |