From 7a1b344a9f6314bc801bf82f42bf739a11a78fe3 Mon Sep 17 00:00:00 2001 From: humpback gusty Date: Thu, 7 Nov 2024 19:49:22 +0800 Subject: [PATCH] Fix wrong unit when split string (#839) --- src/menu/columnar_menu.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/menu/columnar_menu.rs b/src/menu/columnar_menu.rs index 03ca79ab..4de25ee5 100644 --- a/src/menu/columnar_menu.rs +++ b/src/menu/columnar_menu.rs @@ -299,7 +299,7 @@ impl ColumnarMenu { use_ansi_coloring: bool, ) -> String { if use_ansi_coloring { - let match_len = self.working_details.shortest_base_string.width(); + let match_len = self.working_details.shortest_base_string.len(); // Split string so the match text can be styled let (match_str, remaining_str) = suggestion.value.split_at(match_len);