mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-21 09:37:58 +01:00
Clean up so loose ends from the recent Command#execute refactoring.
This fixes [count]u. --HG-- extra : rebase_source : a453a99a757e434b6ce1758320d5840d8286002e
This commit is contained in:
@@ -156,7 +156,7 @@ const Browser = Module("browser", {
|
||||
|
||||
mappings.add([modes.NORMAL], ["<C-l>"],
|
||||
"Redraw the screen",
|
||||
function () { commands.get("redraw").execute("", false); });
|
||||
function () { dactyl.execute("redraw"); });
|
||||
},
|
||||
|
||||
commands: function () {
|
||||
@@ -186,9 +186,8 @@ const Browser = Module("browser", {
|
||||
commands.add(["redr[aw]"],
|
||||
"Redraw the screen",
|
||||
function () {
|
||||
let wu = window.QueryInterface(Ci.nsIInterfaceRequestor)
|
||||
.getInterface(Ci.nsIDOMWindowUtils);
|
||||
wu.redraw();
|
||||
window.QueryInterface(Ci.nsIInterfaceRequestor)
|
||||
.getInterface(Ci.nsIDOMWindowUtils).redraw();
|
||||
modes.show();
|
||||
},
|
||||
{ argCount: "0" });
|
||||
|
||||
@@ -127,14 +127,7 @@ const Command = Class("Command", {
|
||||
/**
|
||||
* Execute this command.
|
||||
*
|
||||
* @param {string} args The args to be parsed and passed to
|
||||
* {@link #action}.
|
||||
* @param {boolean} bang Whether this command was executed with a trailing
|
||||
* bang.
|
||||
* @deprecated
|
||||
* @param {number} count Whether this command was executed with a leading
|
||||
* count.
|
||||
* @deprecated
|
||||
* @param {Args} args The Args object passed to {@link #action}.
|
||||
* @param {Object} modifiers Any modifiers to be passed to {@link #action}.
|
||||
*/
|
||||
execute: function (args, modifiers) {
|
||||
|
||||
@@ -375,8 +375,6 @@ lookup:
|
||||
dactyl.assert(false, "Unexpected end of file waiting for " + end);
|
||||
};
|
||||
|
||||
function execute(args) { command.execute(args, special, count, { setFrom: file }); }
|
||||
|
||||
let iter = Iterator(lines);
|
||||
for (let [i, line] in iter) {
|
||||
if (this.sourcing.finished)
|
||||
|
||||
@@ -968,7 +968,7 @@ const Tabs = Module("tabs", {
|
||||
if (dactyl.has("tabs_undo")) {
|
||||
mappings.add([modes.NORMAL], ["u"],
|
||||
"Undo closing of a tab",
|
||||
function (count) { commands.get("undo").execute("", false, count); },
|
||||
function (count) { dactyl.execute(count + "undo"); },
|
||||
{ count: true });
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user