1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-03-09 17:45:47 +01:00

Fix some args completion bugs. Update where JS completion waits for tab.

This commit is contained in:
Kris Maglione
2008-11-29 11:39:35 +00:00
parent b73d644eae
commit 69f6c66eda
3 changed files with 20 additions and 15 deletions

View File

@@ -480,8 +480,6 @@ function Commands() //{{{
continue;
}
matchOpts(sub);
var optname = "";
if (!onlyArgumentsRemaining)
{
@@ -530,10 +528,12 @@ function Commands() //{{{
let type = argTypes[opt[1]];
if (type && (!complete || arg != null))
{
let orig = arg;
arg = type.parse(arg);
if (arg == null || (typeof arg == "number" && isNaN(arg)))
{
echoerr("Invalid argument for " + type.description + " option: " + optname);
if (!complete || orig != "" || args.completeStart != str.length)
echoerr("Invalid argument for " + type.description + " option: " + optname);
if (complete)
complete.highlight(args.completeStart, count - 1, "SPELLCHECK");
else
@@ -566,6 +566,8 @@ function Commands() //{{{
}
}
matchOpts(sub);
if (complete)
{
if (argCount == "0" || args.length > 0 && (/[1?]/.test(argCount)))