Răsfoiți Sursa

* TextBoxBase.cs: Don't select the word if we are on a line with
no text.


svn path=/trunk/mcs/; revision=67760

Jackson Harper 19 ani în urmă
părinte
comite
22d9d078a0

+ 5 - 0
mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog

@@ -1,3 +1,8 @@
+2006-11-13  Jackson Harper  <[email protected]>
+
+	* TextBoxBase.cs: Don't select the word if we are on a line with
+	no text.
+
 2006-11-13  Gert Driesen  <[email protected]>
 
 	* TreeNodeCollection.cs: Avoid duplicating indexer code.

+ 3 - 0
mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextBoxBase.cs

@@ -1582,6 +1582,9 @@ namespace System.Windows.Forms {
 			int start = document.caret.pos;
 			int end = document.caret.pos;
 
+			if (s.Length < 1)
+				return;
+
 			if (start > 0) {
 				start--;
 				end--;