]> git.sur5r.net Git - i3/i3/commitdiff
fix transition from named to numbered workspace
authorBenedikt Heine <bebe@bebehei.de>
Sun, 31 Jul 2016 17:50:01 +0000 (19:50 +0200)
committerBenedikt Heine <bebe@bebehei.de>
Wed, 24 Aug 2016 09:11:50 +0000 (11:11 +0200)
src/workspace.c

index e6a156cd2f8c96ad145cc85b2f13ce06cda89167..0c80f69f78977a4335c7c04fe2ccdf43ebd77e77 100644 (file)
@@ -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;