Author: jpobst
Date: 2007-10-15 16:52:10 -0400 (Mon, 15 Oct 2007)
New Revision: 87533
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/LineTag.cs
Log:
2007-10-15 Jonathan Pobst <[EMAIL PROTECTED]>
* LineTag.cs: Fix a case where the GetCharIndex would not return 0
when the mouse was to the left of the first character in the line.
Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2007-10-15 20:25:05 UTC (rev 87532)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2007-10-15 20:52:10 UTC (rev 87533)
@@ -1,5 +1,10 @@
2007-10-15 Jonathan Pobst <[EMAIL PROTECTED]>
+ * LineTag.cs: Fix a case where the GetCharIndex would not return 0
+ when the mouse was to the left of the first character in the line.
+
+2007-10-15 Jonathan Pobst <[EMAIL PROTECTED]>
+
* TextBox.cs, TextBoxBase.cs: When setting the document's password
character, use the property instead of the variable so that the
UseSystemPasswordChar property is taken into account.
Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/LineTag.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/LineTag.cs
2007-10-15 20:25:05 UTC (rev 87532)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/LineTag.cs
2007-10-15 20:52:10 UTC (rev 87533)
@@ -353,6 +353,9 @@
if (Length == 0)
return start;
+ if (x < line.widths[low])
+ return low - 1;
+
if (x > line.widths[line.TextLengthWithoutEnding ()])
return line.TextWithoutEnding ().Length;
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches