From 28dcf75d419eca45b796e794e14e983955bdfad8 Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Tue, 2 Jun 2015 21:16:51 +0800 Subject: [PATCH] src/Builder4/Editor.bjs src/Builder4/Editor.vala --- src/Builder4/Editor.bjs | 2 +- src/Builder4/Editor.vala | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Builder4/Editor.bjs b/src/Builder4/Editor.bjs index 2d0a86c75..077fb0c9d 100644 --- a/src/Builder4/Editor.bjs +++ b/src/Builder4/Editor.bjs @@ -31,7 +31,7 @@ "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL", "@ void save" : "()", "$ homogeneous" : false, - "| void forwardSearch" : "() {\n\n\tif (this.searchcontext == null) {\n\t\treturn;\n\t}\n\t\n\n}\n", + "| void forwardSearch" : "() {\n\n\tif (this.searchcontext == null) {\n\t\treturn;\n\t}\n\t\n\tGtk.TextIter beg, st,en;\n\t \n\tthis.buffer.el.get_iter_at_offset(out beg, this.last_search_end);\n\tthis.searchcontext.forward(beg, out st, out en);\n\tthis.last_search_end = 0;\n\t\n\n}\n", "# JsRender.Node node" : "null", "items" : [ { diff --git a/src/Builder4/Editor.vala b/src/Builder4/Editor.vala index eb82cdb2e..441f4876b 100644 --- a/src/Builder4/Editor.vala +++ b/src/Builder4/Editor.vala @@ -174,6 +174,12 @@ public class Editor : Object return; } + Gtk.TextIter beg, st,en; + + this.buffer.el.get_iter_at_offset(out beg, this.last_search_end); + this.searchcontext.forward(beg, out st, out en); + this.last_search_end = 0; + } public class Xcls_Box2 : Object -- 2.39.2