From 1e95f5d9b6dd87cdbad2bd6f2590c06fcaf09121 Mon Sep 17 00:00:00 2001 From: RX14 Date: Fri, 17 May 2019 17:37:24 +0100 Subject: [PATCH] Fix workspace scroll wrapping off the end of the list --- src/modules/sway/workspaces.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/sway/workspaces.cpp b/src/modules/sway/workspaces.cpp index 133c81ad..54835144 100644 --- a/src/modules/sway/workspaces.cpp +++ b/src/modules/sway/workspaces.cpp @@ -223,7 +223,7 @@ const std::string Workspaces::getCycleWorkspace(std::vector::iterat else if (!prev && it != workspaces_.end()) ++it; if (!prev && it == workspaces_.end()) { - return (*(++workspaces_.begin()))["name"].asString(); + return (*(workspaces_.begin()))["name"].asString(); } return (*it)["name"].asString(); } @@ -250,4 +250,4 @@ void Workspaces::onButtonReady(const Json::Value &node, Gtk::Button &button) { Workspaces::operator Gtk::Widget &() { return box_; } -} // namespace waybar::modules::sway \ No newline at end of file +} // namespace waybar::modules::sway