From 4d26d67055f203b397019be0a80623e642a44980 Mon Sep 17 00:00:00 2001 From: teramako Date: Wed, 8 Dec 2010 23:16:57 +0900 Subject: add :pull command and update version --- panorama.js | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) (limited to 'panorama.js') diff --git a/panorama.js b/panorama.js index e86f82b..47f120a 100644 --- a/panorama.js +++ b/panorama.js @@ -2,7 +2,7 @@ * Use at your OWN RISK. */ let INFO = <> -

remove group. The current group is used if ommited GroupName

+ + :pullgroup :pull + :pullgroup buffer + +

pull a tab from the other group

+
+
; @@ -540,6 +547,24 @@ commands.addUserCommand(["rmg[roup]"], "close all tabs in the group", completer: function (context) completion.tabgroup(context, false), }, true); +commands.addUserCommand(["pull[tab]"], "pull a tab from the other group", + function (args) { + const GI = tabView.GroupItems; + let activeGroup = GI.getActiveGroupItem(); + liberator.assert(activeGroup, "Cannot move to the current"); + let arg = args.literalArg; + if (!arg) + return; + let tab = searchTab(arg); + liberator.assert(tab, "No such tab: " + arg); + TV.moveTabTo(tab, activeGroup.id); + gBrowser.mTabContainer.selectedItem = tab; + }, { + argCount: "1", + literal: 0, + completer: function (context) completion.buffer(context, completion.buffer.GROUPS | completion.buffer.ORPHANS), + }, true); + // }}} // ============================================================================ -- cgit v1.2.3