Created
March 30, 2011 14:26
-
-
Save koichik/894494 to your computer and use it in GitHub Desktop.
Auto completion of built-in debugger suggests prefix match rather than partial match.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From 272ada7bf53e6a060cb6cc6fc86eb4f752d79abf Mon Sep 17 00:00:00 2001 | |
From: koichik <koichik@improvement.jp> | |
Date: Wed, 30 Mar 2011 22:17:00 +0900 | |
Subject: [PATCH] Auto completion of built-in debugger suggests prefix match rather than partial match. | |
--- | |
lib/_debugger.js | 2 +- | |
1 files changed, 1 insertions(+), 1 deletions(-) | |
diff --git a/lib/_debugger.js b/lib/_debugger.js | |
index f155ca2..859dc2c 100644 | |
--- a/lib/_debugger.js | |
+++ b/lib/_debugger.js | |
@@ -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]); | |
} | |
} | |
-- | |
1.7.1 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment