src/Palete/Roo.vala
authorAlan Knowles <alan@roojs.com>
Thu, 28 May 2015 11:25:40 +0000 (19:25 +0800)
committerAlan Knowles <alan@roojs.com>
Thu, 28 May 2015 11:25:40 +0000 (19:25 +0800)
src/Palete/Roo.vala

index b895f4d..1e12565 100644 (file)
@@ -241,9 +241,9 @@ namespace Palete {
                        if (complete_string.index_of(".",0) < 0) {
                                // string does not have a '.'
                                // offer up this / Roo / javascript keywords... / look for var string = .. in the code..
-                               for(var i = 0; i <  JsRender.Lang.match_strings ; i++) {
+                               for(var i = 0; i <  JsRender.Lang.match_strings.size ; i++) {
                                        var str = JsRender.Lang.match_strings.get(i);
-                                       if (str.index_of(complete_string,0) == 0) {
+                                       if (str.index_of(complete_string,0) == 0 && complete_string != str) { // should we ignore exact matches... ???
                                                ret.append(new SourceCompletionItem (str, str, null, "javascript : " + str));
                                        }
                                }