split change on activate
authorimmler@in.tum.de
Tue, 02 Jun 2009 19:00:58 +0200
changeset 34591 35712cfcfd7a
parent 34590 320b33f30cae
child 34592 b17ebec3690c
split change on activate
src/Tools/jEdit/src/jedit/ProverSetup.scala
--- a/src/Tools/jEdit/src/jedit/ProverSetup.scala	Tue Jun 02 19:00:58 2009 +0200
+++ b/src/Tools/jEdit/src/jedit/ProverSetup.scala	Tue Jun 02 19:00:58 2009 +0200
@@ -42,7 +42,11 @@
     prover.set_document(theory_view.change_receiver,
       if (path.startsWith(Isabelle.VFS_PREFIX)) path.substring(Isabelle.VFS_PREFIX.length) else path)
     theory_view.activate
-    prover ! new isabelle.proofdocument.Text.Change(Isabelle.plugin.id(), 0,buffer.getText(0, buffer.getLength),0)
+    val MCL = TheoryView.MAX_CHANGE_LENGTH
+    for (i <- 0 to buffer.getLength / MCL) prover !
+      new isabelle.proofdocument.Text.Change(Isabelle.plugin.id(), i * MCL,
+                                             buffer.getText(i * MCL,
+                                                            MCL min buffer.getLength - i * MCL),0)
 
     //register output-view
     prover.output_info += (text =>