mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-21 07:17: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>"],
|
mappings.add([modes.NORMAL], ["<C-l>"],
|
||||||
"Redraw the screen",
|
"Redraw the screen",
|
||||||
function () { commands.get("redraw").execute("", false); });
|
function () { dactyl.execute("redraw"); });
|
||||||
},
|
},
|
||||||
|
|
||||||
commands: function () {
|
commands: function () {
|
||||||
@@ -186,9 +186,8 @@ const Browser = Module("browser", {
|
|||||||
commands.add(["redr[aw]"],
|
commands.add(["redr[aw]"],
|
||||||
"Redraw the screen",
|
"Redraw the screen",
|
||||||
function () {
|
function () {
|
||||||
let wu = window.QueryInterface(Ci.nsIInterfaceRequestor)
|
window.QueryInterface(Ci.nsIInterfaceRequestor)
|
||||||
.getInterface(Ci.nsIDOMWindowUtils);
|
.getInterface(Ci.nsIDOMWindowUtils).redraw();
|
||||||
wu.redraw();
|
|
||||||
modes.show();
|
modes.show();
|
||||||
},
|
},
|
||||||
{ argCount: "0" });
|
{ argCount: "0" });
|
||||||
|
|||||||
@@ -127,14 +127,7 @@ const Command = Class("Command", {
|
|||||||
/**
|
/**
|
||||||
* Execute this command.
|
* Execute this command.
|
||||||
*
|
*
|
||||||
* @param {string} args The args to be parsed and passed to
|
* @param {Args} args The Args object passed to {@link #action}.
|
||||||
* {@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 {Object} modifiers Any modifiers to be passed to {@link #action}.
|
* @param {Object} modifiers Any modifiers to be passed to {@link #action}.
|
||||||
*/
|
*/
|
||||||
execute: function (args, modifiers) {
|
execute: function (args, modifiers) {
|
||||||
|
|||||||
@@ -375,8 +375,6 @@ lookup:
|
|||||||
dactyl.assert(false, "Unexpected end of file waiting for " + end);
|
dactyl.assert(false, "Unexpected end of file waiting for " + end);
|
||||||
};
|
};
|
||||||
|
|
||||||
function execute(args) { command.execute(args, special, count, { setFrom: file }); }
|
|
||||||
|
|
||||||
let iter = Iterator(lines);
|
let iter = Iterator(lines);
|
||||||
for (let [i, line] in iter) {
|
for (let [i, line] in iter) {
|
||||||
if (this.sourcing.finished)
|
if (this.sourcing.finished)
|
||||||
|
|||||||
@@ -968,7 +968,7 @@ const Tabs = Module("tabs", {
|
|||||||
if (dactyl.has("tabs_undo")) {
|
if (dactyl.has("tabs_undo")) {
|
||||||
mappings.add([modes.NORMAL], ["u"],
|
mappings.add([modes.NORMAL], ["u"],
|
||||||
"Undo closing of a tab",
|
"Undo closing of a tab",
|
||||||
function (count) { commands.get("undo").execute("", false, count); },
|
function (count) { dactyl.execute(count + "undo"); },
|
||||||
{ count: true });
|
{ count: true });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user