refactor: replace manual iteration of CWindow with existing methods (#3147)

This commit is contained in:
memchr
2023-09-04 13:13:39 +00:00
committed by GitHub
parent 6a0e2bbff3
commit 69439871e6
3 changed files with 12 additions and 25 deletions

View File

@@ -1243,10 +1243,7 @@ void CKeybindManager::changeGroupActive(std::string args) {
if (args != "b" && args != "prev") {
PWINDOW->setGroupCurrent(PWINDOW->m_sGroupData.pNextWindow);
} else {
CWindow* curr = PWINDOW->m_sGroupData.pNextWindow;
while (curr->m_sGroupData.pNextWindow != PWINDOW)
curr = curr->m_sGroupData.pNextWindow;
PWINDOW->setGroupCurrent(curr);
PWINDOW->setGroupCurrent(PWINDOW->getGroupPrevious());
}
}