Sorry... Forgot to attach the patch.
On Mon, 2006-11-06 at 15:15 -0500, Tania Bento wrote:
> Hey,
>
> This patch fixes a bug in java.awt.TextComponent.setSelectionStart(int)
> that was exposed by Harmony's testsuites. I have committed a mauve test
> for this change.
>
> Cheers,
> Tania
>
> 2006-11-06 Tania Bento <[EMAIL PROTECTED]>
>
> * java/awt/TextComponent.java
> (setSelectionStart): Added check.
>
Index: java/awt/TextComponent.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/awt/TextComponent.java,v
retrieving revision 1.26
diff -u -r1.26 TextComponent.java
--- java/awt/TextComponent.java 6 Jul 2006 17:32:52 -0000 1.26
+++ java/awt/TextComponent.java 6 Nov 2006 20:16:10 -0000
@@ -391,7 +391,9 @@
*/
public synchronized void setSelectionStart(int selectionStart)
{
- select(selectionStart, getSelectionEnd());
+ select(selectionStart,
+ (getSelectionEnd() < selectionStart)
+ ? selectionStart : getSelectionEnd());
}
/**