summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPatrick McDermott <pj@pehjota.net>2017-10-25 14:45:41 (EDT)
committer Patrick McDermott <pj@pehjota.net>2017-10-25 14:45:41 (EDT)
commite62c6624caadedf32648a5525d799ba9bc12f800 (patch)
treef75a896faa847a8064d712a55cb82121e5d30260 /src
parent6f6a4991a97fc09a28ce6d6d5c80cec865fabed3 (diff)
downloadmarquee-e62c6624caadedf32648a5525d799ba9bc12f800.zip
marquee-e62c6624caadedf32648a5525d799ba9bc12f800.tar.gz
marquee-e62c6624caadedf32648a5525d799ba9bc12f800.tar.bz2
mq_notebook_remove_page(): Always keep at least one tab open
Diffstat (limited to 'src')
-rw-r--r--src/notebook.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/notebook.c b/src/notebook.c
index b4e2864..0edd0d0 100644
--- a/src/notebook.c
+++ b/src/notebook.c
@@ -432,6 +432,10 @@ mq_notebook_remove_page(MqNotebook *notebook, MqTabPage *page)
mq_tree_position(notebook->found_node));
g_free(notebook->found_node);
+
+ if (mq_tree_size(MQ_TREE(notebook->tree)) == 1) {
+ mq_notebook_insert_top(notebook, NULL, TRUE);
+ }
}
gint