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

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

index d5b0711..6c5a840 100644 (file)
     "\tvar ar = this.file.getErrors();",
     "\tif (ar.size < 1) {",
     "\t\tbuf.remove_source_marks (start, end, null);",
+    "\t\tthis.last_error_counter = file.error_counter ;",
     "\t\tGLib.debug(\"higjlight has no errors\");",
     "\t\treturn;",
     "\t}",
-    " ",
+    " \tif (this.last_error_counter == file.error_counter) {",
+    "\t\treturn;",
+    "\t}",
+    "\t",
     "",
     " ",
     "\t ",
index 46b616e..945d5bf 100644 (file)
@@ -354,10 +354,14 @@ public class Xcls_GtkView : Object
                var ar = this.file.getErrors();
                if (ar.size < 1) {
                        buf.remove_source_marks (start, end, null);
+                       this.last_error_counter = file.error_counter ;
                        GLib.debug("higjlight has no errors");
                        return;
                }
-        
+               if (this.last_error_counter == file.error_counter) {
+                       return;
+               }
+