From 8921545237436c84da7cc44484e7c41ecc8007b7 Mon Sep 17 00:00:00 2001 From: Taehwan Kim Date: Thu, 20 Jun 2024 11:59:39 +0900 Subject: [PATCH] add more comments --- src/display.rs | 1 + 1 file changed, 1 insertion(+) 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 }