Author: mkrueger
Date: 2008-02-02 19:49:32 -0500 (Sat, 02 Feb 2008)
New Revision: 94663
Modified:
trunk/monodevelop/main/src/addins/Mono.Texteditor/ChangeLog
trunk/monodevelop/main/src/addins/Mono.Texteditor/Mono.TextEditor/LineSplitter.cs
Log:
* Mono.TextEditor/LineSplitter.cs: Added some safety checks.
Modified: trunk/monodevelop/main/src/addins/Mono.Texteditor/ChangeLog
===================================================================
--- trunk/monodevelop/main/src/addins/Mono.Texteditor/ChangeLog 2008-02-03
00:49:16 UTC (rev 94662)
+++ trunk/monodevelop/main/src/addins/Mono.Texteditor/ChangeLog 2008-02-03
00:49:32 UTC (rev 94663)
@@ -1,3 +1,7 @@
+2008-02-03 Mike Krüger <[EMAIL PROTECTED]>
+
+ * Mono.TextEditor/LineSplitter.cs: Added some safety checks.
+
2008-02-01 Mike Krüger <[EMAIL PROTECTED]>
* Mono.TextEditor/TextEditor.cs: Fixed bug.
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 00:49:16 UTC (rev 94662)
+++
trunk/monodevelop/main/src/addins/Mono.Texteditor/Mono.TextEditor/LineSplitter.cs
2008-02-03 00:49:32 UTC (rev 94663)
@@ -84,8 +84,10 @@
void TextReplaced (object sender, ReplaceEventArgs args)
{
- TextRemove (args.Offset, args.Count);
- TextInsert (args.Offset, args.Value);
+ if (args.Count > 0)
+ TextRemove (args.Offset, args.Count);
+ if (args.Value != null && args.Count > 0)
+ TextInsert (args.Offset, args.Value);
}
void TextRemove (int offset, int length)
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches