From: Benedikt Heine Date: Sun, 31 Jul 2016 17:50:01 +0000 (+0200) Subject: fix transition from named to numbered workspace X-Git-Tag: 4.13~52^2~1 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=e35aff5cb9fc577c1016d9c847e5e9bbddc3a888;p=i3%2Fi3 fix transition from named to numbered workspace --- 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;