summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcos <cos>2013-06-12 20:44:22 +0200
committerMartin Samuelsson <cos>2013-06-12 23:33:19 +0200
commit8502f0fd11a7ea5410b1d1d75cdfc4f50cd95587 (patch)
tree0d4ec067c9e463ad39be7e030bf0e19e6a1643a3
parent1bc4668b57fd05d8240152c142ca778f817b728d (diff)
downloaddwb-fix/clear_views_on_close.zip
Exit with empty views when ending by closing last tab.fix/clear_views_on_close
When close-last-tab-policy is set to close, it makes sense to empty the list of views when closing the last tab. The user expectation when first closing all tabs & then starting dwb with one or several urls as arguments is that only the provided urls should be opened. Without this commit an empty tab is created in addition to the ones provided to be opened.
-rw-r--r--src/view.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/view.c b/src/view.c
index fce0bce3..8f3ddae2 100644
--- a/src/view.c
+++ b/src/view.c
@@ -1713,6 +1713,7 @@ view_remove(GList *gl)
if (dwb.misc.clt_policy == CLT_POLICY_CLOSE)
{
view_clear_tab(dwb.state.fview);
+ dwb.state.views = g_list_delete_link(dwb.state.views, dwb.state.fview);
dwb_end(0);
return STATUS_END;
}