Skip to content

Commit

Permalink
add more comments
Browse files Browse the repository at this point in the history
  • Loading branch information
ehwan authored and zwpaper committed Aug 20, 2024
1 parent cfe301a commit 8921545
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/display.rs
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,7 @@ fn get_visible_width(input: &str, hyperlink: bool) -> usize {
}
}

// `UnicodeWidthStr::width` counts all unicode characters including escape '\u{1b}' and hyperlink '\x1B'
UnicodeWidthStr::width(input) - nb_invisible_char
}

Expand Down

0 comments on commit 8921545

Please sign in to comment.