1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-01-03 11:24:12 +01:00

Fix some functions that used to use args.string.

This commit is contained in:
Kris Maglione
2010-09-29 13:21:01 -04:00
parent 47f5b5e9d9
commit f7b99e9272
9 changed files with 25 additions and 25 deletions

View File

@@ -511,7 +511,7 @@ const Tabs = Module("tabs", {
function (args) {
let special = args.bang;
let count = args.count;
let arg = args.literalArg;
let arg = args[0] || "";
if (arg) {
let removed = 0;
@@ -568,7 +568,7 @@ const Tabs = Module("tabs", {
let alternate = tabs.alternate;
try {
dactyl.execute(args[0], null, true);
dactyl.execute(args[0] || "", null, true);
}
finally {
tabs.updateSelectionHistory([tabs.getTab(), alternate]);
@@ -587,7 +587,7 @@ const Tabs = Module("tabs", {
try {
var force = dactyl.forceNewTab;
dactyl.forceNewTab = true;
dactyl.execute(args[0], null, true);
dactyl.execute(args[0] || "", null, true);
}
finally {
dactyl.forceNewTab = force;
@@ -604,7 +604,7 @@ const Tabs = Module("tabs", {
function (args) {
for (let i = 0; i < tabs.count; i++) {
tabs.select(i);
dactyl.execute(args[0], null, true);
dactyl.execute(args[0] || "", null, true);
}
}, {
argCount: "1",
@@ -683,7 +683,7 @@ const Tabs = Module("tabs", {
function (args) {
let special = args.bang;
let count = args.count;
let arg = args.literalArg;
let arg = args[0];
// if a numeric arg is specified any count is ignored; if a
// count and non-numeric arg are both specified then E488
@@ -706,7 +706,7 @@ const Tabs = Module("tabs", {
commands.add(["buffers", "files", "ls", "tabs"],
"Show a list of all buffers",
function (args) { tabs.list(args.literalArg); }, {
function (args) { tabs.list(args[0] || ""); }, {
argCount: "?",
literal: 0
});