From e35aff5cb9fc577c1016d9c847e5e9bbddc3a888 Mon Sep 17 00:00:00 2001 From: Benedikt Heine Date: Sun, 31 Jul 2016 19:50:01 +0200 Subject: [PATCH] fix transition from named to numbered workspace --- src/workspace.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/workspace.c b/src/workspace.c index e6a156cd..0c80f69f 100644 --- a/src/workspace.c +++ b/src/workspace.c @@ -525,7 +525,7 @@ Con *workspace_next(void) { continue; if (!first) first = child; - if (!first_opposite && child->num != -1) + if (!first_opposite || (child->num != -1 && child->num < first_opposite->num)) first_opposite = child; if (child == current) { found_current = true; @@ -590,7 +590,7 @@ Con *workspace_prev(void) { continue; if (!last) last = child; - if (!first_opposite && child->num != -1) + if (!first_opposite || (child->num != -1 && child->num > first_opposite->num)) first_opposite = child; if (child == current) { found_current = true; -- 2.39.5