mirror of
https://github.com/rad4day/Waybar.git
synced 2023-12-21 10:22:59 +01:00
Merge pull request #325 from RX14/bugfix/scroll-broken
Fix workspace scroll wrapping off the end of the list
This commit is contained in:
commit
c862fde986
@ -223,7 +223,7 @@ const std::string Workspaces::getCycleWorkspace(std::vector<Json::Value>::iterat
|
|||||||
else if (!prev && it != workspaces_.end())
|
else if (!prev && it != workspaces_.end())
|
||||||
++it;
|
++it;
|
||||||
if (!prev && it == workspaces_.end()) {
|
if (!prev && it == workspaces_.end()) {
|
||||||
return (*(++workspaces_.begin()))["name"].asString();
|
return (*(workspaces_.begin()))["name"].asString();
|
||||||
}
|
}
|
||||||
return (*it)["name"].asString();
|
return (*it)["name"].asString();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user