diff --git a/penta-sessions.js b/penta-sessions.js index 9010669b9981c947e35fc9c0cf9024cc5978d562..bcb5c434338bdab96b6bf4bbc2b18c61c3a9fed1 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);