src/Pure/PIDE/document.scala
changeset 68335 2f080a51a10d
parent 68323 bf7336731981
child 68365 f9379279f98c
equal deleted inserted replaced
68334:ed40728c45d0 68335:2f080a51a10d
   928         case Some(command) => command_states(version, command).headOption.exists(_.initialized)
   928         case Some(command) => command_states(version, command).headOption.exists(_.initialized)
   929       })
   929       })
   930 
   930 
   931     def node_consolidated(version: Version, name: Node.Name): Boolean =
   931     def node_consolidated(version: Version, name: Node.Name): Boolean =
   932       !name.is_theory ||
   932       !name.is_theory ||
   933         version.nodes(name).commands.reverse.iterator.
   933       {
   934           flatMap(command_states(version, _)).exists(_.consolidated)
   934         val it = version.nodes(name).commands.reverse.iterator
       
   935         it.hasNext && command_states(version, it.next).exists(_.consolidated)
       
   936       }
   935 
   937 
   936     // persistent user-view
   938     // persistent user-view
   937     def snapshot(name: Node.Name = Node.Name.empty, pending_edits: List[Text.Edit] = Nil)
   939     def snapshot(name: Node.Name = Node.Name.empty, pending_edits: List[Text.Edit] = Nil)
   938       : Snapshot =
   940       : Snapshot =
   939     {
   941     {