From: Alan Knowles Date: Tue, 2 Jun 2015 13:20:56 +0000 (+0800) Subject: src/Builder4/Editor.bjs X-Git-Url: http://git.roojs.org/?p=app.Builder.js;a=commitdiff_plain;h=d7e79f23770ea41a7b2f3efefaa4b9c010438613 src/Builder4/Editor.bjs src/Builder4/Editor.vala --- diff --git a/src/Builder4/Editor.bjs b/src/Builder4/Editor.bjs index 03456624a..e2a947082 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\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 = en.get_offset();\n\t\n\tthis.view.el.grab_focus();\n\tthis.buffer.el.place_cursor(st);\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 = en.get_offset();\n\t\n\tthis.view.el.grab_focus();\n\tthis.buffer.el.place_cursor(st);\n\tthis.view.el.scroll_to_iter(st, 0.1f, true, 0.0f, 0.5f);\n\t\n\n}\n", "# JsRender.Node node" : "null", "items" : [ { diff --git a/src/Builder4/Editor.vala b/src/Builder4/Editor.vala index 7c47c65ff..411300a46 100644 --- a/src/Builder4/Editor.vala +++ b/src/Builder4/Editor.vala @@ -182,7 +182,7 @@ public class Editor : Object this.view.el.grab_focus(); this.buffer.el.place_cursor(st); - + this.view.el.scroll_to_iter(st, 0.1f, true, 0.0f, 0.5f); }