//} else {
if (scroll) {
-
+ print("scrolling to node -- should occur on node picking.\n");
this.el.scroll_to_iter(iter, 0.1f, true, 0.0f, 0.5f);
}
});
this.loading = false;
- _this.buffer.dirty = false
+ _this.buffer.dirty = false;
}
public void highlightErrorsJson (string type, Json.Object obj) {
Gtk.TextIter start;
// my vars (def)
- public bool check_queued;
public bool dirty;
public int error_line;
- public bool check_running;
// ctor
public Xcls_buffer(Xcls_WindowRooView _owner )
this.el = new Gtk.SourceBuffer( null );
// my vars (dec)
- this.check_queued = false;
this.dirty = false;
this.error_line = -1;
- this.check_running = false;
// set gobject values
// ??needed..??
// _this.save_button.el.sensitive = true;
///?? has changed occured during loading?
+ if (_this.sourceview.loading) {
+ return;
+ }
+
print("- PREVIEW EDITOR CHANGED--");
}
public bool checkSyntax () {
- if (this.check_running) {
- print("Check is running\n");
- if (this.check_queued) {
- print("Check is already queued");
- return true;
- }
- this.check_queued = true;
- print("Adding queued Check ");
- GLib.Timeout.add_seconds(1, () => {
- this.check_queued = false;
-
- this.checkSyntax();
- return false;
- });
-
-
- return true;
- }
+
var str = this.toString();
// needed???
this.el.remove_source_marks (start, end, null);
}
+
if (str.length < 1) {
print("checkSyntax - empty string?\n");
return true;
}
- if (_this.file.xtype == "PlainFile") {
-
- // assume it's gtk...
- this.check_running = true;
- /*
- if (!_this.window.windowstate.valasource.checkPlainFileSpawn(
- _this.file,
- str
- )) {
- this.check_running = false;
- }
- */
- return true;
-
- }
if (_this.file == null) {
return true;
}
if (_this.file.language == "js") {
- this.check_running = false;
+
print("calling validate javascript\n");
- /* return this.highlightErrors(p.validateJavascript(
+ return this.highlightErrors(p.validateJavascript(
str,
_this.key,
_this.ptype,
_this.file,
_this.node
));
- */
+
}