diff --git a/src/display.rs b/src/display.rs index adb55db94..ca037f0b7 100644 --- a/src/display.rs +++ b/src/display.rs @@ -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 }