Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save koichik/894494 to your computer and use it in GitHub Desktop.
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.
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