1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-21 19:47:59 +01:00

Revert "In delmarks, change let variable name to prevent namespace-related error (bug #126)."

This reverts commit f6eb37e82c0419cdc62c1a781b64d30148024a58.
This commit is contained in:
Kris Maglione
2009-01-24 00:45:01 -05:00
parent d99720ce10
commit 3a4da78529

View File

@@ -1614,20 +1614,20 @@ function Marks() //{{{
function (args)
{
let special = args.bang;
let argstring = args.string;
let args = args.string;
if (!special && !argstring)
if (!special && !args)
{
liberator.echoerr("E471: Argument required");
return;
}
if (special && argstring)
if (special && args)
{
liberator.echoerr("E474: Invalid argument");
return;
}
let matches;
if (matches = argstring.match(/(?:(?:^|[^a-zA-Z0-9])-|-(?:$|[^a-zA-Z0-9])|[^a-zA-Z0-9 -]).*/))
if (matches = args.match(/(?:(?:^|[^a-zA-Z0-9])-|-(?:$|[^a-zA-Z0-9])|[^a-zA-Z0-9 -]).*/))
{
// NOTE: this currently differs from Vim's behavior which
// deletes any valid marks in the arg list, up to the first
@@ -1636,7 +1636,7 @@ function Marks() //{{{
return;
}
// check for illegal ranges - only allow a-z A-Z 0-9
if (matches = argstring.match(/[a-zA-Z0-9]-[a-zA-Z0-9]/g))
if (matches = args.match(/[a-zA-Z0-9]-[a-zA-Z0-9]/g))
{
for (let i = 0; i < matches.length; i++)
{
@@ -1647,13 +1647,13 @@ function Marks() //{{{
/[0-9]/.test(start) != /[0-9]/.test(end) ||
start > end)
{
liberator.echoerr("E475: Invalid argument: " + argstring.match(matches[i] + ".*")[0]);
liberator.echoerr("E475: Invalid argument: " + args.match(matches[i] + ".*")[0]);
return;
}
}
}
marks.remove(argstring, special);
marks.remove(args, special);
},
{
bang: true,