diff options
author | Kris Maglione <maglione.k@gmail.com> | 2010-12-31 21:39:31 -0500 |
---|---|---|
committer | Kris Maglione <maglione.k@gmail.com> | 2010-12-31 21:39:31 -0500 |
commit | 54a3974a2a4e48c4b15ffa9ddaf92e39384fc572 (patch) | |
tree | 5eea5ec7b395b80f6972490daa3d5fc562343bc1 | |
parent | 5438c7d61deb98d48340dcb514cca452d857f28f (diff) | |
download | pentadactyl-54a3974a2a4e48c4b15ffa9ddaf92e39384fc572.tar.gz |
Fix highlighting and reporting of unknown command.
-rw-r--r-- | common/content/commands.js | 3 | ||||
-rw-r--r-- | common/content/options.js | 1 |
2 files changed, 3 insertions, 1 deletions
diff --git a/common/content/commands.js b/common/content/commands.js index 73fd1a74..3ee6b0d6 100644 --- a/common/content/commands.js +++ b/common/content/commands.js @@ -1239,7 +1239,8 @@ var Commands = Module("commands", { // dynamically get completions as specified with the command's completer function context.highlight(); if (!command) { - context.highlight(0, args.commandName && args.commandName.length, "SPELLCHECK"); + context.message = "No such command: " + match.cmd; + context.highlight(0, match.cmd.length, "SPELLCHECK"); return; } diff --git a/common/content/options.js b/common/content/options.js index 7c9b0856..401b1569 100644 --- a/common/content/options.js +++ b/common/content/options.js @@ -999,6 +999,7 @@ var Options = Module("options", { let opt = options.parseOpt(filter, modifiers); let prefix = opt.prefix; + context.highlight(); if (context.filter.indexOf("=") == -1) { if (false && prefix) context.filters.push(function ({ item }) item.type == "boolean" || prefix == "inv" && isArray(item.values)); |