aboutsummaryrefslogtreecommitdiffstats
path: root/src/window.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/window.rs')
-rw-r--r--src/window.rs1
1 files changed, 1 insertions, 0 deletions
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::<Vec<_>>();
if graphemes.len() >= to {
format!("{}...", graphemes.iter().take(to - 3).fold(String::new(), |acc, s| format!("{}{}", acc, s)))