}
ltree.view.setCursor(tp, "editor");
// ltree.view.el.set_cursor(new Gtk.TreePath.from_string(tp), null, false);
- this.nodeSelected(node);
+ this.nodeSelected(node,false);
// scrolling is disabled... as node selection calls scroll 10ms after it changes.
GLib.Timeout.add_full(GLib.Priority.DEFAULT,100 , () => {
// highlight the node..
}
- public void nodeSelected (JsRender.Node? sel, bool scroll =false) {
+ public void nodeSelected (JsRender.Node? sel, bool scroll ) {
}
public void loadFile ( ) {
this.loading = true;
+
+
+ // get the cursor and scroll position....
var buf = this.el.get_buffer();
+ var cpos = buf.cursor_position;
+
+
+
+ var vadj = this.el.get_vadjustment();
+
+
+
buf.set_text("",0);
var sbuf = (Gtk.SourceBuffer) buf;
sbuf.remove_source_marks (start, end, null); // remove all marks..
+ while(Gtk.events_pending()) {
+ Gtk.main_iteration();
+ }
+
+ Gtk.TextIter cpos_iter;
+ buf.get_iter_at_offset(out cpos_iter, cpos);
+ buf.place_cursor(cpos_iter);
+
+ this.el.set_vadjustment(vadj);
+
this.loading = false;