src/Palete/Gtk.vala
authorAlan Knowles <alan@roojs.com>
Fri, 29 May 2015 03:42:30 +0000 (11:42 +0800)
committerAlan Knowles <alan@roojs.com>
Fri, 29 May 2015 03:42:30 +0000 (11:42 +0800)
src/Palete/Gtk.vala

index cd29db4..21517d9 100644 (file)
@@ -312,20 +312,12 @@ namespace Palete {
                                        var m = (Vala.TokenType)i;
                                        var s = m.to_string();
                                        var ss = s.slice(1,-1);
-                                       if (s[0] == '`' && GLib.Regex.match_simple("^[a-z]+$", ss)) {
-                                               print("%s\n",ss);
+                                       if (s[0] == '`' && GLib.Regex.match_simple("^[a-z]+$", ss) &&
+                                               complete_string != ss && ss.index_of(complete_string,0) == 0 ) {
+                                               ret.append(new SourceCompletionItem (ss, ss, null, "vala : " + str));
                                        }
                                }
                                
-                               for(var i = 0; i <  JsRender.Lang.match_strings.size ; i++) {
-                                       var str = JsRender.Lang.match_strings.get(i);
-                                       if (complete_string != str && str.index_of(complete_string,0) == 0 ) { // should we ignore exact matches... ???
-                                               ret.append(new SourceCompletionItem (str, str, null, "javascript : " + str));
-                                       }
-                                       
-                                       
-                               }
-                               
                                if (complete_string != "_this" && "_this".index_of(complete_string,0) == 0 ) { // should we ignore exact matches... ???
                                        ret.append(new SourceCompletionItem ("_this - the top level element", "_this", null, "Top level element"));
                                }