From aa1a7ff708572535c1e952e6318128b69142a893 Mon Sep 17 00:00:00 2001 From: bakkeby Date: Fri, 7 Jan 2022 22:27:08 +0100 Subject: [PATCH] Fix for infinite loop when there is only one client and pushup is run twice --- patch/push.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/patch/push.c b/patch/push.c index 9410e61..68123a6 100644 --- a/patch/push.c +++ b/patch/push.c @@ -40,9 +40,11 @@ pushup(const Arg *arg) } else { /* move to the end */ for (c = sel; c->next; c = c->next); - detach(sel); - sel->next = NULL; - c->next = sel; + if (sel != c) { + detach(sel); + sel->next = NULL; + c->next = sel; + } } focus(sel); arrange(selmon);