}
// user defined functions
+ public Gee.ArrayList<int> search (string txt) {
+ var ret = new Gee.ArrayList<int>();
+
+ return ret;
+ }
public bool saveContents () {
}
-
-
+
var str = _this.buffer.toString();
return true;
}
+ public void scroll_to_line (int line) {
+
+ GLib.Timeout.add(500, () => {
+
+ var buf = this.view.el.get_buffer();
+
+ var sbuf = (Gtk.SourceBuffer) buf;
+
+
+ Gtk.TextIter iter;
+ sbuf.get_iter_at_line(out iter, line);
+ this.view.el.scroll_to_iter(iter, 0.1f, true, 0.0f, 0.5f);
+ return false;
+ });
+ }
public void show (JsRender.JsRender file, JsRender.Node? node, string ptype, string key)
{
this.file = file;
// init method
- try {
- var description = Pango.FontDescription.from_string("monospace");
+ var description = Pango.FontDescription.from_string("monospace");
description.set_size(8000);
this.el.override_font(description);
- } catch (GLib.Error e) {
- }
this.el.completion.add_provider(new Palete.CompletionProvider(_this));
this.el.completion.unblock_interactive();