Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/renderer/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Loading