From 50c303873177119f7756d628c0384661b41f0d1d Mon Sep 17 00:00:00 2001 From: Brooks J Rady Date: Tue, 12 Jan 2021 15:59:26 +0000 Subject: [PATCH] Need to take into account the 2 chars of ', ' that also may be added! --- src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 3774de98..590bb3a9 100644 --- a/src/main.rs +++ b/src/main.rs @@ -19,7 +19,7 @@ impl MosaicTile for State { self.lines = vec![String::new()]; for item in get_help() { let width = self.lines.last().unwrap().len(); - if width + item.len() > cols - more_msg.len() { + if width + item.len() + 2 > cols - more_msg.len() { self.lines.last_mut().unwrap().push_str(more_msg); self.lines.push(item); } else {