1
0
mirror of https://github.com/Llewellynvdm/starship.git synced 2024-12-01 09:13:54 +00:00

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)
This commit is contained in:
Jon Grythe Stødle 2019-12-19 23:56:30 +01:00 committed by Matan Kushner
parent 6a2b0a67b0
commit f898b22b55

View File

@ -24,6 +24,8 @@ pub fn get_prompt(context: Context) -> String {
writeln!(buf).unwrap(); writeln!(buf).unwrap();
} }
buf.push_str("\x1b[J");
let mut prompt_order: Vec<&str> = Vec::new(); let mut prompt_order: Vec<&str> = Vec::new();
// Write out a custom prompt order // Write out a custom prompt order