Auto completion of built-in debugger suggests prefix match rather than partial match.

This commit is contained in:
koichik 2011-03-30 22:17:00 +09:00 committed by Ryan Dahl
parent ca028f4b37
commit 682b66c0c1

View File

@ -652,7 +652,7 @@ Interface.prototype.complete = function(line) {
line = line.replace(/^\s*/, '');
for (var i = 0; i < commands.length; i++) {
if (commands[i].indexOf(line) >= 0) {
if (commands[i].indexOf(line) === 0) {
matches.push(commands[i]);
}
}