src/Pure/PIDE/document_status.scala
changeset 83185 47edc6384e7a
parent 83184 9e05d3acd2b4
child 83186 887f1eac24d1
--- a/src/Pure/PIDE/document_status.scala	Wed Sep 17 11:30:59 2025 +0200
+++ b/src/Pure/PIDE/document_status.scala	Wed Sep 17 11:41:27 2025 +0200
@@ -41,7 +41,7 @@
       proper_elements + Markup.WARNING + Markup.LEGACY + Markup.ERROR
 
     def make(
-      markups: Iterable[Markup] = Nil,
+      markups: List[Markup] = Nil,
       warned: Boolean = false,
       failed: Boolean = false
     ): Command_Status = {
@@ -127,22 +127,28 @@
           runs = runs + that.runs)
       }
 
-    def update(warned: Boolean = false, failed: Boolean = false): Command_Status = {
-      val warned1 = this.warned || warned
-      val failed1 = this.failed || failed
-      if (this.warned == warned1 && this.failed == failed1) this
-      else {
-        new Command_Status(
-          theory_status = theory_status,
-          touched = touched,
-          accepted = accepted,
-          warned = warned1,
-          failed = failed1,
-          canceled = canceled,
-          forks = forks,
-          runs = runs
-        )
+    def update(
+      markups: List[Markup] = Nil,
+      warned: Boolean = false,
+      failed: Boolean = false
+    ): Command_Status = {
+      if (markups.isEmpty) {
+        val warned1 = this.warned || warned
+        val failed1 = this.failed || failed
+        if (this.warned == warned1 && this.failed == failed1) this
+        else {
+          new Command_Status(
+            theory_status = theory_status,
+            touched = touched,
+            accepted = accepted,
+            warned = warned1,
+            failed = failed1,
+            canceled = canceled,
+            forks = forks,
+            runs = runs)
+        }
       }
+      else this + Command_Status.make(markups = markups, warned = warned, failed = failed)
     }
 
     def maybe_consolidated: Boolean = touched && forks == 0 && runs == 0