From c05c7874e39cd5b50869f9e77eec15e856d8b651 Mon Sep 17 00:00:00 2001 From: Daniel Knuettel Date: Wed, 17 Apr 2024 09:54:09 +0200 Subject: [PATCH] fixed non-printable character messing up width of text --- src/make_prompt.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/make_prompt.rs b/src/make_prompt.rs index 6e3978a..e4fa4a0 100644 --- a/src/make_prompt.rs +++ b/src/make_prompt.rs @@ -166,7 +166,7 @@ fn get_editor() -> String fn shell_color_str(string_in: &T, color: &str) -> String { - format!("\x1b[{color}m{string_in}\x1b[00m") + format!("\x01\x1b[{color}m\x02{string_in}\x01\x1b[00m\x02") } fn getenv(varname: &str) -> String