From 668c8ce66ecdc6645c44e5526338c099716095e5 Mon Sep 17 00:00:00 2001 From: Noah Swerhun Date: Fri, 10 Mar 2023 21:08:50 -0600 Subject: [PATCH] fixed extra space w/ blank module bug --- main.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/main.py b/main.py index 4dd2933..4f94931 100644 --- a/main.py +++ b/main.py @@ -14,11 +14,14 @@ def print_bar(): print("%{c}", end="") case "right": print("%{r}", end="") - group = running_modules_dict[alignment] + group = list(running_modules_dict[alignment].items()) for index, module in enumerate(group): - print(group[module], end="") - if index != (len(group) - 1) and len(group[module]) > 0: - print(seperator, end="") + print(module[1], end="") + if index != (len(group) - 1) and len(module[1]) > 0: + for i in range(index + 1, len(group) - 1): + if len(group[i][1]) > 0: + print(seperator, end="") + break; print(flush=True)