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

sort :commands for tab-completion

This commit is contained in:
Martin Stubenschrott
2008-03-01 00:27:10 +00:00
parent 3c203e5563
commit 48a79ca3cf
4 changed files with 13 additions and 15 deletions

View File

@@ -669,7 +669,6 @@ vimperator.CommandLine = function () //{{{
completionlist.selectItem(completionIndex);
}
if (completionIndex == -1 && !longest) // wrapped around matches, reset command line
{
if (full && completions.length > 1)
@@ -679,12 +678,14 @@ vimperator.CommandLine = function () //{{{
}
else
{
var compl = null;
if (longest && completions.length > 1)
var compl = vimperator.completion.getLongestSubstring();
compl = vimperator.completion.getLongestSubstring();
else if (full)
var compl = completions[completionIndex][0];
compl = completions[completionIndex][0];
else if (completions.length == 1)
var compl = completions[0][0];
compl = completions[0][0];
if (compl)
{
setCommand(command.substring(0, completionStartIndex) + compl + completionPostfix);