summaryrefslogtreecommitdiff
path: root/src/ui
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2021-05-09 14:13:56 +0300
committerJaakko Keränen <jaakko.keranen@iki.fi>2021-05-09 14:13:56 +0300
commit8006fba1b77dc2072a7c29b3a91889bba5f8cd37 (patch)
tree4a388292d9d8c88a67cb4606c9fb731f1ed6acac /src/ui
parentaad89b2118a859333afadaf5f8894c5ef410fa7f (diff)
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.
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/window.c4
1 files changed, 4 insertions, 0 deletions
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) {
1197 if (oldCount == 2 && splitMode == 0) { 1197 if (oldCount == 2 && splitMode == 0) {
1198 /* Keep references to the tabs of the second root. */ 1198 /* Keep references to the tabs of the second root. */
1199 const iDocumentWidget *curPage = document_Root(d->keyRoot); 1199 const iDocumentWidget *curPage = document_Root(d->keyRoot);
1200 if (!curPage) {
1201 /* All tabs closed on that side. */
1202 curPage = document_Root(otherRoot_Window(d, d->keyRoot));
1203 }
1200 iObjectList *tabs = listDocuments_App(d->roots[1]); 1204 iObjectList *tabs = listDocuments_App(d->roots[1]);
1201 iForEach(ObjectList, i, tabs) { 1205 iForEach(ObjectList, i, tabs) {
1202 setRoot_Widget(i.object, d->roots[0]); 1206 setRoot_Widget(i.object, d->roots[0]);