From db1118c258e079b97fe376f54d05a4c6a7ef9c3f Mon Sep 17 00:00:00 2001 From: nightwing Date: Sun, 9 Jun 2013 18:57:49 +0400 Subject: [PATCH] fix typo --- lib/ace/ext/language_tools.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ace/ext/language_tools.js b/lib/ace/ext/language_tools.js index 1d54d3b9..7133d740 100644 --- a/lib/ace/ext/language_tools.js +++ b/lib/ace/ext/language_tools.js @@ -39,8 +39,8 @@ var textCompleter = require("../autocomplete/text_completer"); var keyWordCompleter = { getCompletions: function(session, pos, prefix, callback) { var keywords = session.$mode.$keywordList || []; - keywords.filter(function(w) { - return w.lastIndexOf(prefix, 0); + keywords = keywords.filter(function(w) { + return w.lastIndexOf(prefix, 0) == 0; }); callback(null, keywords.map(function(word) { return {