From dead8e8b3acc26e7efd64f1f86a48b4ddd450aea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaakko=20Kera=CC=88nen?= Date: Sun, 9 May 2021 14:13:56 +0300 Subject: [PATCH 1/1] Window: Fixed closing all tabs in the left split Take the current tab from the other side if the active side is out of tabs. --- src/ui/window.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/ui/window.c b/src/ui/window.c index f4ebd522..4cbb8d00 100644 --- a/src/ui/window.c +++ b/src/ui/window.c @@ -1197,6 +1197,10 @@ void setSplitMode_Window(iWindow *d, int splitFlags) { if (oldCount == 2 && splitMode == 0) { /* Keep references to the tabs of the second root. */ const iDocumentWidget *curPage = document_Root(d->keyRoot); + if (!curPage) { + /* All tabs closed on that side. */ + curPage = document_Root(otherRoot_Window(d, d->keyRoot)); + } iObjectList *tabs = listDocuments_App(d->roots[1]); iForEach(ObjectList, i, tabs) { setRoot_Widget(i.object, d->roots[0]); -- 2.34.1