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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user