src/Builder4/Editor.bjs
[app.Builder.js] / src / Builder4 / Editor.vala
index a984fc2..ac300ac 100644 (file)
@@ -119,10 +119,16 @@ public class Editor : Object
     
        var s = new Gtk.SourceSearchSettings();
        
-       this.sourcecontext = new Gtk.SourceSearchContext(this.buffer.el,s);
-       this.sourcecontext .set_highlight(true);
+       this.searchcontext = new Gtk.SourceSearchContext(this.buffer.el,s);
+       this.searchcontext .set_highlight(true);
        s.set_search_text(txt);
-       return this.sourcecontext.get_occurrences_count();
+       Gtk.TextIter beg, st,en;
+        
+       this.buffer.el.get_start_iter(out beg);
+       this.searchcontext.forward(beg, out st, out en);
+       
+       
+       return this.searchcontext.get_occurrences_count();
     
      
        
@@ -159,6 +165,9 @@ public class Editor : Object
         }
     
            
+    }
+    public void forwardSearch () {
+    
     }
     public class Xcls_Box2 : Object
     {