mirror of
https://github.com/lsd-rs/lsd
synced 2025-01-07 09:28:47 +00:00
fix unicode-width version to 0.1.13
This commit is contained in:
parent
5918660f48
commit
b0d55bb846
3 changed files with 7 additions and 5 deletions
4
Cargo.lock
generated
4
Cargo.lock
generated
|
@ -1257,9 +1257,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "unicode-width"
|
||||
version = "0.1.11"
|
||||
version = "0.1.13"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e51733f11c9c4f72aa0c160008246859e340b00807569a0da0e7a1079b27ba85"
|
||||
checksum = "0336d538f7abc86d282a4189614dfaa90810dfc2c6f6427eaf88e16311dd225d"
|
||||
|
||||
[[package]]
|
||||
name = "unsafe-libyaml"
|
||||
|
|
|
@ -36,7 +36,7 @@ once_cell = "1.17.1"
|
|||
chrono = { version = "0.4.19", features = ["unstable-locales"] }
|
||||
chrono-humanize = "0.2"
|
||||
# unicode-width 0.1.13 has a breaking change so stick to 0.1.11
|
||||
unicode-width = "=0.1.11"
|
||||
unicode-width = "0.1.13"
|
||||
lscolors = "0.16.0"
|
||||
wild = "2.0"
|
||||
globset = "0.4.*"
|
||||
|
|
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue