fixed non-printable character messing up width of text
This commit is contained in:
parent
af84040321
commit
c05c7874e3
|
@ -166,7 +166,7 @@ fn get_editor() -> String
|
||||||
|
|
||||||
fn shell_color_str<T: std::fmt::Display>(string_in: &T, color: &str) -> String
|
fn shell_color_str<T: std::fmt::Display>(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
|
fn getenv(varname: &str) -> String
|
||||||
|
|
Loading…
Reference in New Issue
Block a user