From b58c04200f0c2b4cfe9e4d06c2263beead330302 Mon Sep 17 00:00:00 2001 From: Doug Kearns Date: Tue, 21 Oct 2008 14:50:51 +0000 Subject: [PATCH] fix :undoall definition, the command doesn't accept a ! or count --- content/tabs.js | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/content/tabs.js b/content/tabs.js index f99417df..10e027b7 100644 --- a/content/tabs.js +++ b/content/tabs.js @@ -630,19 +630,17 @@ function Tabs() //{{{ commands.add(["undoa[ll]"], "Undo closing of all closed tabs", - function (args, special, count) + function (args) { - var ss = Components.classes["@mozilla.org/browser/sessionstore;1"] + let ss = Components.classes["@mozilla.org/browser/sessionstore;1"] .getService(Components.interfaces.nsISessionStore); - var undoItems = eval("(" + ss.getClosedTabData(window) + ")"); + let undoItems = eval("(" + ss.getClosedTabData(window) + ")"); + for (let i = 0; i < undoItems.length; i++) undoCloseTab(); // doesn't work with i as the index to undoCloseTab + }, - { - argCount: "0", - bang: true, - count: true - }); + { argCount: "0" }); commands.add(["wqa[ll]", "wq", "xa[ll]"], "Save the session and quit",