From d7954c2cb5a69e858345c04d9fc7b917d5553f8c Mon Sep 17 00:00:00 2001
From: eri451 <hans.orter@gmx.de>
Date: Mon, 2 Apr 2012 07:13:56 +0200
Subject: [PATCH] one step closer

not done yet
---
 penta-sessions.js | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/penta-sessions.js b/penta-sessions.js
index 9010669..bcb5c43 100644
--- a/penta-sessions.js
+++ b/penta-sessions.js
@@ -181,6 +181,16 @@ group.commands.add(['sessionl[oad]'],
             return;
         }
 
+        // delete inactive groups --> only vivisble tabs will remain
+        tabs.getGroups( function ({ GroupItems }) {
+            let activeGroup = GroupItems.getActiveGroupItem();
+            let items = GroupItems.groupItems;
+            for(let i in items){
+                if (items[i].id !== activeGroup.id)
+                    items[i].closeAll();
+            }
+        });
+
         let curtab = gBrowser.mCurrentTab;
         if(!args.bang) tabs.keepOnly(curtab); //FIXME deletes only visible tabs
         let sessionscript = io.source(file.path);
-- 
GitLab