Author: mkrueger
Date: 2008-02-03 13:33:51 -0500 (Sun, 03 Feb 2008)
New Revision: 94709
Modified:
trunk/monodevelop/main/src/addins/Mono.Texteditor/ChangeLog
trunk/monodevelop/main/src/addins/Mono.Texteditor/Mono.TextEditor/Document.cs
trunk/monodevelop/main/src/addins/Mono.Texteditor/Mono.TextEditor/IBuffer.cs
trunk/monodevelop/main/src/addins/Mono.Texteditor/Mono.TextEditor/LineSegmentTree.cs
trunk/monodevelop/main/src/addins/Mono.Texteditor/Mono.TextEditor/LineSplitter.cs
Log:
* Mono.TextEditor/Document.cs, Mono.TextEditor/LineSplitter.cs,
Mono.TextEditor/IBuffer.cs, Mono.TextEditor/LineSegmentTree.cs:
Fixed reload bug.
Modified: trunk/monodevelop/main/src/addins/Mono.Texteditor/ChangeLog
===================================================================
--- trunk/monodevelop/main/src/addins/Mono.Texteditor/ChangeLog 2008-02-03
18:29:17 UTC (rev 94708)
+++ trunk/monodevelop/main/src/addins/Mono.Texteditor/ChangeLog 2008-02-03
18:33:51 UTC (rev 94709)
@@ -1,5 +1,11 @@
2008-02-03 Mike Krüger <[EMAIL PROTECTED]>
+ * Mono.TextEditor/Document.cs, Mono.TextEditor/LineSplitter.cs,
+ Mono.TextEditor/IBuffer.cs, Mono.TextEditor/LineSegmentTree.cs: Fixed
+ reload bug.
+
+2008-02-03 Mike Krüger <[EMAIL PROTECTED]>
+
* TangoStyle.xml: Changed literal color in tango style.
2008-02-03 Mike Krüger <[EMAIL PROTECTED]>
Modified:
trunk/monodevelop/main/src/addins/Mono.Texteditor/Mono.TextEditor/Document.cs
===================================================================
---
trunk/monodevelop/main/src/addins/Mono.Texteditor/Mono.TextEditor/Document.cs
2008-02-03 18:29:17 UTC (rev 94708)
+++
trunk/monodevelop/main/src/addins/Mono.Texteditor/Mono.TextEditor/Document.cs
2008-02-03 18:33:51 UTC (rev 94709)
@@ -46,6 +46,16 @@
}
}
+ public string Text {
+ get {
+ return buffer.Text;
+ }
+ set {
+ splitter.Clear ();
+ buffer.Text = value;
+ }
+ }
+
string mimeType;
public string MimeType {
get {
Modified:
trunk/monodevelop/main/src/addins/Mono.Texteditor/Mono.TextEditor/IBuffer.cs
===================================================================
---
trunk/monodevelop/main/src/addins/Mono.Texteditor/Mono.TextEditor/IBuffer.cs
2008-02-03 18:29:17 UTC (rev 94708)
+++
trunk/monodevelop/main/src/addins/Mono.Texteditor/Mono.TextEditor/IBuffer.cs
2008-02-03 18:33:51 UTC (rev 94709)
@@ -40,6 +40,7 @@
get;
set;
}
+
void Insert (int offset, StringBuilder value);
void Remove (int offset, int count);
void Replace (int offset, int count, StringBuilder value);
Modified:
trunk/monodevelop/main/src/addins/Mono.Texteditor/Mono.TextEditor/LineSegmentTree.cs
===================================================================
---
trunk/monodevelop/main/src/addins/Mono.Texteditor/Mono.TextEditor/LineSegmentTree.cs
2008-02-03 18:29:17 UTC (rev 94708)
+++
trunk/monodevelop/main/src/addins/Mono.Texteditor/Mono.TextEditor/LineSegmentTree.cs
2008-02-03 18:33:51 UTC (rev 94709)
@@ -57,6 +57,12 @@
}
}
+ public int Length {
+ get {
+ return tree.Root.value.totalLength;
+ }
+ }
+
public LineSegmentTree()
{
tree.ChildrenChanged += delegate (object sender,
RedBlackTree<TreeNode>.RedBlackTreeNodeEventArgs args) {
Modified:
trunk/monodevelop/main/src/addins/Mono.Texteditor/Mono.TextEditor/LineSplitter.cs
===================================================================
---
trunk/monodevelop/main/src/addins/Mono.Texteditor/Mono.TextEditor/LineSplitter.cs
2008-02-03 18:29:17 UTC (rev 94708)
+++
trunk/monodevelop/main/src/addins/Mono.Texteditor/Mono.TextEditor/LineSplitter.cs
2008-02-03 18:33:51 UTC (rev 94709)
@@ -52,6 +52,10 @@
}
}
+ public void Clear ()
+ {
+ lines.Clear ();
+ }
public LineSplitter (IBuffer buffer)
{
lines.Clear ();
@@ -92,7 +96,7 @@
void TextRemove (int offset, int length)
{
- if (length == 0)
+ if (length == 0 || (lines.Count == 1 && lines.Length ==
0))
return;
LineSegmentTree.TreeNode startNode =
lines.GetNodeAtOffset (offset);
int charsRemoved = startNode.EndOffset - offset;
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches