From f78810047c5edb53032974297700116de7150b25 Mon Sep 17 00:00:00 2001 From: Daniel Berg Date: Thu, 29 Feb 2024 15:07:23 +0100 Subject: [PATCH] fix: hide split char on empty fix #38 --- src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index d836967..b97a000 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -230,7 +230,7 @@ pub fn update_tree( let mut new: String = String::from(initial); // if we do split on colon we need to insert a new one, cause it gets split out - if split_at == ':' && !initial.is_empty() { + if split_at == ':' && !initial.is_empty() && !titles.is_empty() { new.push(':'); } // Push new window titles to new string