fix: use selected window for /clearmessages (#5489)

This commit is contained in:
nerix
2024-07-07 12:41:21 +02:00
committed by GitHub
parent 2d11e79f4d
commit 4535823ca8
2 changed files with 6 additions and 5 deletions
+5 -5
View File
@@ -401,11 +401,11 @@ QString clearmessages(const CommandContext &ctx)
{
(void)ctx;
auto *currentPage = dynamic_cast<SplitContainer *>(getIApp()
->getWindows()
->getMainWindow()
.getNotebook()
.getSelectedPage());
auto *currentPage = getIApp()
->getWindows()
->getLastSelectedWindow()
->getNotebook()
.getSelectedPage();
if (auto *split = currentPage->getSelectedSplit())
{