From 7e7413ce368ca4df615a1b0401924d79783cbf63 Mon Sep 17 00:00:00 2001 From: Daniel Grunwald Date: Sat, 15 Oct 2005 14:52:35 +0000 Subject: [PATCH] Update component library, tried to fix exception when switching back from the form designer when deleting controls from the form so that the caret position is after the end of the document. git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@572 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61 --- data/options/SharpDevelopControlLibrary.sdcl | 68 ++++++++++--------- .../Test/AssemblyInfo.cs | 4 +- .../Project/Src/Gui/Caret.cs | 1 + .../Project/Src/Gui/TextView.cs | 1 + 4 files changed, 39 insertions(+), 35 deletions(-) diff --git a/data/options/SharpDevelopControlLibrary.sdcl b/data/options/SharpDevelopControlLibrary.sdcl index f5245cfd6e..2a3f212c84 100644 --- a/data/options/SharpDevelopControlLibrary.sdcl +++ b/data/options/SharpDevelopControlLibrary.sdcl @@ -6,68 +6,64 @@ - - - - - - - - + + - - - - + + - - - - - - - + + - - - + - - - - - - - - - + + + + + + + + + + + + + + + + + + + + @@ -81,11 +77,17 @@ - + + + + + + - + + diff --git a/src/Libraries/ICSharpCode.Build.Tasks/Test/AssemblyInfo.cs b/src/Libraries/ICSharpCode.Build.Tasks/Test/AssemblyInfo.cs index 906720da13..f976075ae3 100644 --- a/src/Libraries/ICSharpCode.Build.Tasks/Test/AssemblyInfo.cs +++ b/src/Libraries/ICSharpCode.Build.Tasks/Test/AssemblyInfo.cs @@ -1,4 +1,4 @@ -using System.Reflection; +using System.Reflection; using System.Runtime.CompilerServices; // Information about this assembly is defined by the following @@ -23,5 +23,5 @@ using System.Runtime.CompilerServices; // You can specify all values by your own or you can build default build and revision // numbers with the '*' character (the default): -[assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("2.0.0.1")] diff --git a/src/Libraries/ICSharpCode.TextEditor/Project/Src/Gui/Caret.cs b/src/Libraries/ICSharpCode.TextEditor/Project/Src/Gui/Caret.cs index c885d63da4..17503c94bc 100644 --- a/src/Libraries/ICSharpCode.TextEditor/Project/Src/Gui/Caret.cs +++ b/src/Libraries/ICSharpCode.TextEditor/Project/Src/Gui/Caret.cs @@ -172,6 +172,7 @@ namespace ICSharpCode.TextEditor } } if (currentPos.X < 0) { + ValidateCaretPos(); currentPos = ScreenPosition; } SetCaretPos(currentPos.X, currentPos.Y); diff --git a/src/Libraries/ICSharpCode.TextEditor/Project/Src/Gui/TextView.cs b/src/Libraries/ICSharpCode.TextEditor/Project/Src/Gui/TextView.cs index d0ae43efe1..df3dc20a0a 100644 --- a/src/Libraries/ICSharpCode.TextEditor/Project/Src/Gui/TextView.cs +++ b/src/Libraries/ICSharpCode.TextEditor/Project/Src/Gui/TextView.cs @@ -870,6 +870,7 @@ namespace ICSharpCode.TextEditor float CountColumns(ref int column, int start, int end, int logicalLine, Graphics g) { if (start > end) throw new ArgumentException("start > end"); + if (start == end) return 0; float spaceWidth = SpaceWidth; float drawingPos = 0; int tabIndent = Document.TextEditorProperties.TabIndent;