Wayland compositor (wlroots)
git clone https://git.lucas.co/cce-compositor.git
swap: use correct direction for it_wrap
Always using .forward results in a crash when running `swap previous` on
the first view in stack which should be wrapped.
river/command/swap.zig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/river/command/swap.zig b/river/command/swap.zig
index ac2f1a8..2c138fe 100644
--- a/river/command/swap.zig
+++ b/river/command/swap.zig
@@ -51,7 +51,7 @@ pub fn swap(
);
var it_wrap = ViewStack(View).iter(
if (direction == .next) output.views.first else output.views.last,
- .forward,
+ if (direction == .next) .forward else .reverse,
output.pending.tags,
filter,
);