1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-02-15 03:05:45 +01:00

Ignore case in :sidebar and :dialog completion.

Also fixes these to report the original arg in error messages again.
This commit is contained in:
Doug Kearns
2009-02-24 15:09:01 +11:00
parent e318da7073
commit 60791f64af
3 changed files with 17 additions and 8 deletions

View File

@@ -255,7 +255,7 @@ const liberator = (function () //{{{
"Open a " + config.name + " dialog",
function (args)
{
let arg = args[0].toLowerCase();
let arg = args[0];
try
{
@@ -264,7 +264,7 @@ const liberator = (function () //{{{
for (let [,dialog] in Iterator(dialogs))
{
if (arg == dialog[0])
if (util.compareIgnoreCase(arg, dialog[0]) == 0)
{
dialog[2]();
return;
@@ -281,7 +281,11 @@ const liberator = (function () //{{{
{
argCount: "1",
bang: true,
completer: function (context, args) completion.dialog(context)
completer: function (context)
{
context.ignoreCase = true;
return completion.dialog(context);
}
});
commands.add(["em[enu]"],