clarified Document.Node.clear -- retain header (cf. ML version);
--- a/src/Pure/PIDE/document.scala Wed Aug 24 16:27:27 2011 +0200
+++ b/src/Pure/PIDE/document.scala Wed Aug 24 16:49:48 2011 +0200
@@ -82,6 +82,9 @@
val blobs: Map[String, Blob],
val commands: Linear_Set[Command])
{
+ def clear: Node = Node.empty.copy(header = header)
+
+
/* commands */
private lazy val full_index: (Array[(Command, Text.Offset)], Text.Range) =
--- a/src/Pure/Thy/thy_syntax.scala Wed Aug 24 16:27:27 2011 +0200
+++ b/src/Pure/Thy/thy_syntax.scala Wed Aug 24 16:49:48 2011 +0200
@@ -232,7 +232,7 @@
edits foreach {
case (name, Document.Node.Clear()) =>
doc_edits += (name -> Document.Node.Clear())
- nodes -= name
+ nodes += (name -> nodes(name).clear)
case (name, Document.Node.Edits(text_edits)) =>
val node = nodes(name)