src/Builder4/Editor.bjs
authorAlan <alan@roojs.com>
Thu, 18 Aug 2022 10:09:46 +0000 (18:09 +0800)
committerAlan <alan@roojs.com>
Thu, 18 Aug 2022 10:09:46 +0000 (18:09 +0800)
src/Builder4/Editor.vala

src/Builder4/Editor.bjs
src/Builder4/Editor.vala

index ca02312..eeffe6b 100644 (file)
     "\t",
     "\tGtk.TextIter beg, st,en;",
     "\tbool has_wrapped_around;",
-    "\tthis.buffer.el.get_iter_at_offset(out beg, this.last_search_end);",
+    "\tthis.buffer.el.get_iter_at_offset(out beg, this.last_search_end -1 );",
     "\t",
     "\tif (!this.searchcontext.backward2(beg, out st, out en, out has_wrapped_around)) {",
     "\t",
index a4a31bf..d70b9ea 100644 (file)
@@ -151,7 +151,7 @@ public class Editor : Object
        
        Gtk.TextIter beg, st,en;
        bool has_wrapped_around;
-       this.buffer.el.get_iter_at_offset(out beg, this.last_search_end);
+       this.buffer.el.get_iter_at_offset(out beg, this.last_search_end -1 );
        
        if (!this.searchcontext.backward2(beg, out st, out en, out has_wrapped_around)) {