src/Builder4/Editor.bjs
[app.Builder.js] / src / Builder4 / Editor.vala
index a4ed0d5..40e7e31 100644 (file)
@@ -25,6 +25,7 @@ public class Editor : Object
     public int pos_root_y;
     public string ptype;
     public string key;
+    public Gtk.SourceSearchContext searchcontext;
     public JsRender.JsRender file;
     public bool pos;
     public bool dirty;
@@ -63,10 +64,10 @@ public class Editor : Object
     
        var s = new Gtk.SourceSearchSettings();
        
-       var sctx = new Gtk.SourceSearchContext(this.buffer,s);
+       var sctx = new Gtk.SourceSearchContext(this.buffer.el,s);
        sctx.set_highlight(true);
        s.set_search_text(txt);
-       
+       while (sctx.get_occurence_position(st, en)> -1) {
     
     
        var ret =  new Gee.ArrayList<int>();