summaryrefslogtreecommitdiffstats
path: root/src/app
diff options
context:
space:
mode:
authorClement Tsang <34804052+ClementTsang@users.noreply.github.com>2024-05-07 22:53:51 -0400
committerGitHub <noreply@github.com>2024-05-07 22:53:51 -0400
commit073ca890f7348fb2963d6babb26197af4dc2d3b3 (patch)
tree03927bf3f127b7fb4c6ef55a39cad6a9fd135e7f /src/app
parentd515c03ec7d25b9e53245bb7d141eb4fb4f2c556 (diff)
refactor: extract unicode-ellipsis into its own crate (#1465)
* refactor: extract unicode-ellipsis into its own crate * 0.1.4
Diffstat (limited to 'src/app')
-rw-r--r--src/app/states.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/app/states.rs b/src/app/states.rs
index ee69d90c..0088e53d 100644
--- a/src/app/states.rs
+++ b/src/app/states.rs
@@ -2,12 +2,12 @@ use std::{ops::Range, time::Instant};
use hashbrown::HashMap;
use indexmap::IndexMap;
+use unicode_ellipsis::grapheme_width;
use unicode_segmentation::{GraphemeCursor, GraphemeIncomplete, UnicodeSegmentation};
use crate::{
app::{layout_manager::BottomWidgetType, query::*},
constants,
- utils::strings::str_width,
widgets::{
BatteryWidgetState, CpuWidgetState, DiskTableWidget, MemWidgetState, NetWidgetState,
ProcWidgetState, TempWidgetState,
@@ -250,7 +250,7 @@ impl AppSearchState {
for (index, grapheme) in
UnicodeSegmentation::grapheme_indices(self.current_search_query.as_str(), true)
{
- let width = str_width(grapheme);
+ let width = grapheme_width(grapheme);
let end = curr_offset + width;
self.size_mappings.insert(index, curr_offset..end);