diff --git a/Cargo.lock b/Cargo.lock index df16c1d..60f308e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1246,7 +1246,7 @@ dependencies = [ [[package]] name = "toss" version = "0.1.0" -source = "git+https://github.com/Garmelon/toss.git?rev=d693712dab61d806c3ac36083d27016e67794154#d693712dab61d806c3ac36083d27016e67794154" +source = "git+https://github.com/Garmelon/toss.git?rev=e4e1454e8064269350ff7f10b2dcbb388d26c57d#e4e1454e8064269350ff7f10b2dcbb388d26c57d" dependencies = [ "crossterm", "unicode-linebreak", diff --git a/Cargo.toml b/Cargo.toml index 392667f..afcd508 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -30,4 +30,4 @@ features = ["rustls-tls-native-roots"] [dependencies.toss] git = "https://github.com/Garmelon/toss.git" -rev = "d693712dab61d806c3ac36083d27016e67794154" +rev = "e4e1454e8064269350ff7f10b2dcbb388d26c57d" diff --git a/src/ui/widgets/text.rs b/src/ui/widgets/text.rs index d7ee938..466b4e5 100644 --- a/src/ui/widgets/text.rs +++ b/src/ui/widgets/text.rs @@ -40,7 +40,7 @@ impl Widget for Text { let lines = self.wrapped(frame, max_width); let min_width = lines .iter() - .map(|l| frame.width(&l.text())) + .map(|l| frame.width_styled(l)) .max() .unwrap_or(0); let min_height = lines.len();