equal
deleted
inserted
replaced
132 var updated_keywords = false |
132 var updated_keywords = false |
133 var nodes = previous.nodes |
133 var nodes = previous.nodes |
134 val doc_edits = new mutable.ListBuffer[Document.Edit_Command] |
134 val doc_edits = new mutable.ListBuffer[Document.Edit_Command] |
135 |
135 |
136 edits foreach { |
136 edits foreach { |
137 case (name, Document.Node.Header(header)) => |
137 case (name, Document.Node.Deps(header)) => |
138 val node = nodes(name) |
138 val node = nodes(name) |
139 val update_header = |
139 val update_header = |
140 (node.header, header) match { |
140 !node.header.errors.isEmpty || !header.errors.isEmpty || node.header != header |
141 case (Exn.Res(deps0), Exn.Res(deps)) => deps0 != deps |
|
142 case _ => true |
|
143 } |
|
144 if (update_header) { |
141 if (update_header) { |
145 val node1 = node.update_header(header) |
142 val node1 = node.update_header(header) |
146 updated_imports = updated_imports || (node.imports != node1.imports) |
143 updated_imports = updated_imports || (node.header.imports != node1.header.imports) |
147 updated_keywords = updated_keywords || (node.keywords != node1.keywords) |
144 updated_keywords = updated_keywords || (node.header.keywords != node1.header.keywords) |
148 nodes += (name -> node1) |
145 nodes += (name -> node1) |
149 doc_edits += (name -> Document.Node.Header(header)) |
146 doc_edits += (name -> Document.Node.Deps(header)) |
150 } |
147 } |
151 case _ => |
148 case _ => |
152 } |
149 } |
153 |
150 |
154 val syntax = |
151 val syntax = |
287 inserted_commands.map(cmd => (commands3.prev(cmd), Some(cmd))) |
284 inserted_commands.map(cmd => (commands3.prev(cmd), Some(cmd))) |
288 |
285 |
289 doc_edits += (name -> Document.Node.Edits(cmd_edits)) |
286 doc_edits += (name -> Document.Node.Edits(cmd_edits)) |
290 nodes += (name -> node.update_commands(commands3)) |
287 nodes += (name -> node.update_commands(commands3)) |
291 |
288 |
292 case (name, Document.Node.Header(_)) => |
289 case (name, Document.Node.Deps(_)) => |
293 |
290 |
294 case (name, Document.Node.Perspective(text_perspective)) => |
291 case (name, Document.Node.Perspective(text_perspective)) => |
295 val node = nodes(name) |
292 val node = nodes(name) |
296 val perspective = command_perspective(node, text_perspective) |
293 val perspective = command_perspective(node, text_perspective) |
297 if (!(node.perspective same perspective)) { |
294 if (!(node.perspective same perspective)) { |