src/Builder4/About.vala.c
[app.Builder.js] / src / Builder4 / Editor.vala
index 8243a30..9a78522 100644 (file)
@@ -119,19 +119,18 @@ 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_occurences_count();
-    
-    
-       var s = new Gtk.SourceSearchSettings();
-       var buf = (Gtk.SourceBuffer) this.sourceview.el.get_buffer();
-       this.sourcecontext = new Gtk.SourceSearchContext(buf,s);
-       this.sourcecontext.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();
     
+     
        
     
     }