From 54c663c01a63521ec7959eceed96af1f3f98ecb5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gustav=20S=C3=B6rn=C3=A4s?= Date: Mon, 3 May 2021 23:53:54 +0200 Subject: add todo --- src/window.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/window.rs b/src/window.rs index a2f2b68..baabc30 100644 --- a/src/window.rs +++ b/src/window.rs @@ -18,6 +18,7 @@ pub enum Line { } pub fn truncate_dots(s: &str, to: usize) -> String { + //TODO We don't have time to do this every tick let graphemes = s.graphemes(true).collect::>(); if graphemes.len() >= to { format!("{}...", graphemes.iter().take(to - 3).fold(String::new(), |acc, s| format!("{}{}", acc, s))) -- cgit v1.2.1