mirror of
https://github.com/lsd-rs/lsd.git
synced 2026-04-21 02:45:58 +02:00
fix unicode-width version to 0.1.13
This commit is contained in:
@@ -439,7 +439,8 @@ fn get_visible_width(input: &str, hyperlink: bool) -> usize {
|
||||
|
||||
let m_pos = s.find('m');
|
||||
if let Some(len) = m_pos {
|
||||
nb_invisible_char += len
|
||||
// len points to the 'm' character, we must include 'm' to invisible characters
|
||||
nb_invisible_char += len + 1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -449,7 +450,8 @@ fn get_visible_width(input: &str, hyperlink: bool) -> usize {
|
||||
|
||||
let m_pos = s.find("\x1B\x5C");
|
||||
if let Some(len) = m_pos {
|
||||
nb_invisible_char += len
|
||||
// len points to the '\x1B' character, we must include both '\x1B' and '\x5C' to invisible characters
|
||||
nb_invisible_char += len + 2
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user