src/Builder4/Editor.bjs
[app.Builder.js] / src / Builder4 / Editor.vala
index 269fc65..e5fc553 100644 (file)
@@ -129,7 +129,7 @@ public class Editor : Object
             this.key_edit.el.hide();
         }
     
-            
+           
     }
     public class Xcls_Box2 : Object
     {
@@ -276,12 +276,10 @@ public class Editor : Object
             var description =   Pango.FontDescription.from_string("monospace");
                 description.set_size(8000);
                 this.el.override_font(description);
-                var p = new Palete.CompletionProvider(_this);
-            
-               this.el.completion.add_provider(p);
+               this.el.completion.add_provider(new Palete.CompletionProvider(_this));
                this.el.completion.unblock_interactive();
-               this.el.completion.select_on_show                       = true;
-               this.el.completion.show_headers                 = true;
+               this.el.completion.select_on_show                       = true; // select
+               this.el.completion.show_headers                 = false;
                this.el.completion.remember_info_visibility             = true;
             
               
@@ -359,18 +357,17 @@ public class Editor : Object
             var lg = _this.file.content_type.length > 0  ?
                     lm.guess_language(_this.file.path, _this.file.content_type) :
                     lm.get_language(lang);
-            
-           
+             
            
             ((Gtk.SourceBuffer)(this.el.get_buffer())) .set_language(lg); 
         
             this.el.insert_spaces_instead_of_tabs = true;
-            
-            print("sourcelanguage  = %s\n", lg.name);
-            if (lg.name == "Vala") {
-                this.el.insert_spaces_instead_of_tabs = false;
-            }
-             
+            if (lg != null) {
+                       print("sourcelanguage  = %s\n", lg.name);
+                       if (lg.name == "Vala") {
+                           this.el.insert_spaces_instead_of_tabs = false;
+                       }
+             }
             _this.dirty = false;
             this.el.grab_focus();
             _this.save_button.el.sensitive = false;