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

use argCount: "1" with :*unabbrev commands

This commit is contained in:
Doug Kearns
2008-12-10 17:02:54 +11:00
parent 90b2fba611
commit aec2c278c2
2 changed files with 8 additions and 1 deletions

View File

@@ -408,6 +408,9 @@ function Commands() //{{{
// @param allowUnknownOptions: -foo won't result in an error, if -foo isn't // @param allowUnknownOptions: -foo won't result in an error, if -foo isn't
// specified in "options" // specified in "options"
// TODO: should it handle comments? // TODO: should it handle comments?
// : it might be nice to be able to specify that certain quoting
// should be disabled E.g. backslash without having to resort to
// using literal etc
parseArgs: function (str, options, argCount, allowUnknownOptions, literal, complete, extra) parseArgs: function (str, options, argCount, allowUnknownOptions, literal, complete, extra)
{ {
function getNextArg(str) commands.parseArg(str); function getNextArg(str) commands.parseArg(str);

View File

@@ -179,7 +179,11 @@ function Editor() //{{{
commands.add([ch ? ch + "una[bbrev]" : "una[bbreviate]"], commands.add([ch ? ch + "una[bbrev]" : "una[bbreviate]"],
"Remove an abbreviation" + modeDescription, "Remove an abbreviation" + modeDescription,
function (args) { editor.removeAbbreviation(mode, args.string); }); function (args) { editor.removeAbbreviation(mode, args.literalArg); },
{
argCount: "1",
literal: 0
});
commands.add([ch + "abc[lear]"], commands.add([ch + "abc[lear]"],
"Remove all abbreviations" + modeDescription, "Remove all abbreviations" + modeDescription,