From 3a4da7852985d7371b372c9f8801c5ce52c7a0d8 Mon Sep 17 00:00:00 2001 From: Kris Maglione Date: Sat, 24 Jan 2009 00:45:01 -0500 Subject: [PATCH] Revert "In delmarks, change let variable name to prevent namespace-related error (bug #126)." This reverts commit f6eb37e82c0419cdc62c1a781b64d30148024a58. --- common/content/buffer.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/common/content/buffer.js b/common/content/buffer.js index 631aab8d..c08ca04b 100644 --- a/common/content/buffer.js +++ b/common/content/buffer.js @@ -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,