consider snapshot as service of Session, not Document.Change;
authorwenzelm
Thu, 12 Aug 2010 13:43:55 +0200
changeset 38359 96b22dfeb56a
parent 38358 15819cbd7b0e
child 38360 53224a4d2f0e
consider snapshot as service of Session, not Document.Change;
src/Pure/System/session.scala
src/Tools/jEdit/src/jedit/document_model.scala
--- a/src/Pure/System/session.scala	Thu Aug 12 13:42:05 2010 +0200
+++ b/src/Pure/System/session.scala	Thu Aug 12 13:43:55 2010 +0200
@@ -356,7 +356,8 @@
 
   def stop() { session_actor ! Stop }
 
-  def current_change(): Document.Change = editor_history.current_change()
+  def snapshot(name: String, pending_edits: List[Text_Edit]): Document.Snapshot =
+    editor_history.current_change().snapshot(name, pending_edits)
 
   def edit_document(edits: List[Document.Node_Text_Edit]) { editor_history !? Edit_Document(edits) }
 }
--- a/src/Tools/jEdit/src/jedit/document_model.scala	Thu Aug 12 13:42:05 2010 +0200
+++ b/src/Tools/jEdit/src/jedit/document_model.scala	Thu Aug 12 13:43:55 2010 +0200
@@ -227,7 +227,7 @@
 
   def snapshot(): Document.Snapshot = {
     Swing_Thread.require()
-    session.current_change().snapshot(thy_name, pending_edits.snapshot())
+    session.snapshot(thy_name, pending_edits.snapshot())
   }