From 25a95856d17c1921922c169db7caf4ace0641244 Mon Sep 17 00:00:00 2001 From: Scott Schafer Date: Wed, 27 Aug 2025 10:10:09 -0600 Subject: [PATCH] fix!: Remove char_width and str_width from the public API --- src/renderer/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/renderer/mod.rs b/src/renderer/mod.rs index ddc3045e..2c87458b 100644 --- a/src/renderer/mod.rs +++ b/src/renderer/mod.rs @@ -2666,11 +2666,11 @@ fn num_decimal_digits(num: usize) -> usize { MAX_DIGITS } -pub fn str_width(s: &str) -> usize { +fn str_width(s: &str) -> usize { s.chars().map(char_width).sum() } -pub fn char_width(ch: char) -> usize { +fn char_width(ch: char) -> usize { // FIXME: `unicode_width` sometimes disagrees with terminals on how wide a `char` is. For now, // just accept that sometimes the code line will be longer than desired. match ch {