Author: mkrueger
Date: 2008-02-02 05:29:04 -0500 (Sat, 02 Feb 2008)
New Revision: 94610
Modified:
trunk/monodevelop/main/src/addins/MonoDevelop.SourceEditor2/ChangeLog
trunk/monodevelop/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/SourceEditorView.cs
trunk/monodevelop/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/SourceEditorWidget.cs
trunk/monodevelop/main/src/addins/MonoDevelop.SourceEditor2/gtk-gui/gui.stetic
Log:
* MonoDevelop.SourceEditor/SourceEditorWidget.cs: Added bounds check
for error underlining.
Modified: trunk/monodevelop/main/src/addins/MonoDevelop.SourceEditor2/ChangeLog
===================================================================
--- trunk/monodevelop/main/src/addins/MonoDevelop.SourceEditor2/ChangeLog
2008-02-02 08:52:42 UTC (rev 94609)
+++ trunk/monodevelop/main/src/addins/MonoDevelop.SourceEditor2/ChangeLog
2008-02-02 10:29:04 UTC (rev 94610)
@@ -1,3 +1,8 @@
+2008-02-02 Mike Krüger <[EMAIL PROTECTED]>
+
+ * MonoDevelop.SourceEditor/SourceEditorWidget.cs: Added bounds check for
+ error underlining.
+
2008-02-01 Mike Krüger <[EMAIL PROTECTED]>
* MonoDevelop.SourceEditor/SourceEditorView.cs: Fixed insert/delete text
Modified:
trunk/monodevelop/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/SourceEditorView.cs
===================================================================
---
trunk/monodevelop/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/SourceEditorView.cs
2008-02-02 08:52:42 UTC (rev 94609)
+++
trunk/monodevelop/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/SourceEditorView.cs
2008-02-02 10:29:04 UTC (rev 94610)
@@ -68,11 +68,8 @@
// widget.TextEditor.Buffer.TextReplaced += delegate
(object sender, ReplaceEventArgs args) {
// int startIndex = args.Offset;
// int endIndex = startIndex + Math.Max
(args.Count, args.Value != null ? args.Value.Length : 0);
-// if (this.extension != null) {
-// extension.TextChanged (startIndex,
endIndex);
-// } else {
-// this.TextChanged (startIndex, endIndex);
-// }
+// if (TextChanged != null)
+// TextChanged (this, new
TextChangedEventArgs (startIndex, endIndex));
// };
widget.TextEditor.Buffer.TextReplaced += delegate {
Modified:
trunk/monodevelop/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/SourceEditorWidget.cs
===================================================================
---
trunk/monodevelop/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/SourceEditorWidget.cs
2008-02-02 08:52:42 UTC (rev 94609)
+++
trunk/monodevelop/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/SourceEditorWidget.cs
2008-02-02 10:29:04 UTC (rev 94610)
@@ -166,6 +166,8 @@
void AddMarker (List<FoldSegment> foldSegments, string text,
IRegion region)
{
+ if (region.BeginLine <= 0 || region.EndLine <= 0
|| region.BeginLine >= this.TextEditor.Document.Splitter.LineCount
|| region.EndLine >= this.TextEditor.Document.Splitter.LineCount)
+ return;
int startOffset =
this.TextEditor.Document.LocationToOffset (region.BeginLine - 1,
region.BeginColumn - 1);
int endOffset =
this.TextEditor.Document.LocationToOffset (region.EndLine - 1,
region.EndColumn - 1);
foldSegments.Add (new FoldSegment (text, startOffset,
endOffset - startOffset));
Modified:
trunk/monodevelop/main/src/addins/MonoDevelop.SourceEditor2/gtk-gui/gui.stetic
===================================================================
---
trunk/monodevelop/main/src/addins/MonoDevelop.SourceEditor2/gtk-gui/gui.stetic
2008-02-02 08:52:42 UTC (rev 94609)
+++
trunk/monodevelop/main/src/addins/MonoDevelop.SourceEditor2/gtk-gui/gui.stetic
2008-02-02 10:29:04 UTC (rev 94610)
@@ -6,6 +6,9 @@
</configuration>
<import>
<widget-library name="../../../../build/bin/Mono.TextEditor.dll" />
+ <widget-library name="../../../../build/bin/MonoDevelop.Ide.dll" />
+ <widget-library name="../../../../build/bin/MonoDevelop.Components.dll" />
+ <widget-library name="../../../../build/bin/MonoDevelop.Projects.Gui.dll"
/>
<widget-library
name="../../../../build/AddIns/MonoDevelop.SourceEditor2.dll" internal="true" />
</import>
<widget class="Gtk.Bin" id="MonoDevelop.SourceEditor.SourceEditorWidget"
design-size="300 300">
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches