--- a/src/Tools/jEdit/src/jedit/ScrollerDockable.scala Tue Nov 18 22:07:40 2008 +0100
+++ b/src/Tools/jEdit/src/jedit/ScrollerDockable.scala Tue Nov 18 22:15:06 2008 +0100
@@ -195,9 +195,9 @@
//containing the unrendered messages
-class MessageBuffer extends ArrayBuffer[Document] with Unrendered[Document]{
+class MessageBuffer extends HashMap[Int,Document] with Unrendered[Document]{
override def addUnrendered (id: Int, m: Document) {
- append(m)
+ update(id, m)
}
override def getUnrendered (id: Int): Option[Document] = {
if(id < size && id >= 0 && apply(id) != null) Some (apply(id))
--- a/src/Tools/jEdit/src/jedit/TheoryView.scala Tue Nov 18 22:07:40 2008 +0100
+++ b/src/Tools/jEdit/src/jedit/TheoryView.scala Tue Nov 18 22:15:06 2008 +0100
@@ -197,7 +197,18 @@
}
override def contentInserted(buffer : JEditBuffer, startLine : Int,
- offset : Int, numLines : Int, length : Int) { }
+ offset : Int, numLines : Int, length : Int) {
+
+ if(length > 1) {
+ //longer text inserted -> convert it
+ val text = buffer.getText(offset, length)
+ val decoded = VFS.converter.decode(text)
+ if(!text.equals(decoded)){
+ buffer.remove(offset, length)
+ buffer.insert(offset, decoded)
+ }
+ }
+ }
override def contentRemoved(buffer : JEditBuffer, startLine : Int,
offset : Int, numLines : Int, length : Int) { }
@@ -218,14 +229,6 @@
buffer.remove(beginning, length)
buffer.insert(beginning, decoded)
}
- } else {
- //longer text inserted -> convert it
- val text = buffer.getText(offset, length)
- val decoded = VFS.converter.decode(text)
- if(!text.equals(decoded)){
- buffer.remove(offset, length)
- buffer.insert(offset, decoded)
- }
}
if (col == null)