1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-23 09:48:00 +01:00

Quick hack to show the longest-substring preview on the commandline.

This commit is contained in:
Kris Maglione
2008-11-27 07:36:36 +00:00
parent 81e4be0aee
commit d87c66210f
2 changed files with 19 additions and 3 deletions

View File

@@ -1183,7 +1183,6 @@ function Completion() //{{{
// dynamically get completions as specified with the command's completer function
let command = commands.get(cmd);
let compObject = { start: 0, items: [] };
if (!command)
{
context.highlight(0, cmd.length, "SPELLCHECK");
@@ -1204,7 +1203,7 @@ function Completion() //{{{
cmdContext.advance(args.completeStart);
cmdContext.quote = args.quote;
cmdContext.filter = args.completeFilter;
compObject = command.completer.call(command, cmdContext, args);
let compObject = command.completer.call(command, cmdContext, args);
if (compObject instanceof Array) // for now at least, let completion functions return arrays instead of objects
compObject = { start: compObject[0], items: compObject[1] };
if (compObject != null)