this.el.show_line_marks = true;
this.el.insert_spaces_instead_of_tabs = true;
this.el.show_line_numbers = true;
+ this.el.draw_spaces = Gtk.SourceDrawSpacesFlags.LEADING;
this.el.highlight_current_line = true;
var child_0 = new Xcls_buffer( _this );
child_0.ref();
if (_this.file != null) {
lang = _this.file.language;
}
-
-
- ((Gtk.SourceBuffer)(this.el.get_buffer())) .set_language(
- _this.file.content_type.length > 0 ?
+ print("lang=%s, content_type = %s\n", lang, _this.file.content_type);
+ var lg = _this.file.content_type.length > 0 ?
lm.guess_language(_this.file.path, _this.file.content_type) :
- lm.get_language(lang)
- );
-
+ lm.get_language(lang);
+
+
+
+ ((Gtk.SourceBuffer)(this.el.get_buffer())) .set_language(lg);
+
+ this.el.insert_spaces_instead_of_tabs = true;
+ if (lg.name == "vala") {
+ this.el.insert_spaces_instead_of_tabs = false;
+ }
_this.dirty = false;
this.el.grab_focus();