From f2b0ce231753b0c48f82240c552c20e760258ea3 Mon Sep 17 00:00:00 2001 From: Doug Kearns Date: Fri, 29 Aug 2008 09:02:36 +0000 Subject: [PATCH] revert use of argCount in :unmap commands as parseArgs() currently has no means of dealing with unmatched quotes --- content/mappings.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/content/mappings.js b/content/mappings.js index 64166ffd..5ccfdcd8 100644 --- a/content/mappings.js +++ b/content/mappings.js @@ -228,12 +228,18 @@ liberator.Mappings = function () //{{{ "Remove a mapping" + modeDescription, function (args) { + if (!args) + { + liberator.echoerr("E474: Invalid argument"); + return; + } + var found = false; for (let i = 0; i < modes.length; i++) { - if (liberator.mappings.hasMap(modes[i], args.arguments[0])) + if (liberator.mappings.hasMap(modes[i], args)) { - liberator.mappings.remove(modes[i], args.arguments[0]); + liberator.mappings.remove(modes[i], args); found = true; } } @@ -241,7 +247,6 @@ liberator.Mappings = function () //{{{ liberator.echoerr("E31: No such mapping"); }, { - argCount: "1", completer: function (filter) { return liberator.completion.userMapping(filter, modes);