src/Builder4/GtkView.bjs
authorAlan Knowles <alan@roojs.com>
Sun, 28 Jan 2024 11:37:38 +0000 (19:37 +0800)
committerAlan Knowles <alan@roojs.com>
Sun, 28 Jan 2024 11:37:38 +0000 (19:37 +0800)
src/Builder4/GtkView.vala

src/Builder4/GtkView.bjs
src/Builder4/GtkView.vala

index 1184e24..d5b0711 100644 (file)
     ""
    ],
    "| void updateErrorMarks" : [
-    "(string category) {",
+    "() {",
     "\t",
     " ",
     "",
     "\tGtk.TextIter end;     ",
     "\tbuf.get_bounds (out start, out end);",
     "",
-    "\tbuf.remove_source_marks (start, end, category);",
+    "",
     " ",
     "\tGLib.debug(\"highlight errors\");\t\t ",
     "",
     "\t\treturn;",
     "",
     "\t}",
-    "\tvar ar = this.file.getErrors(category);",
-    "\tif (ar == null || ar.get_n_items() < 1) {",
-    "\t\tGLib.debug(\"higjlight %s has no errors\", category);",
+    "\tvar ar = this.file.getErrors();",
+    "\tif (ar.size < 1) {",
+    "\t\tbuf.remove_source_marks (start, end, null);",
+    "\t\tGLib.debug(\"higjlight has no errors\");",
     "\t\treturn;",
     "\t}",
     " ",
index 4430440..46b616e 100644 (file)
@@ -328,7 +328,7 @@ public class Xcls_GtkView : Object
            
             
        }
-       public void updateErrorMarks (string category) {
+       public void updateErrorMarks () {
                
         
        
@@ -337,7 +337,7 @@ public class Xcls_GtkView : Object
                Gtk.TextIter end;     
                buf.get_bounds (out start, out end);
        
-               buf.remove_source_marks (start, end, category);
+       
         
                GLib.debug("highlight errors");          
        
@@ -351,9 +351,10 @@ public class Xcls_GtkView : Object
                        return;
        
                }
-               var ar = this.file.getErrors(category);
-               if (ar == null || ar.get_n_items() < 1) {
-                       GLib.debug("higjlight %s has no errors", category);
+               var ar = this.file.getErrors();
+               if (ar.size < 1) {
+                       buf.remove_source_marks (start, end, null);
+                       GLib.debug("higjlight has no errors");
                        return;
                }