summaryrefslogtreecommitdiff
path: root/java
diff options
context:
space:
mode:
authorTania Bento <tbento@redhat.com>2006-11-06 20:18:06 +0000
committerTania Bento <tbento@redhat.com>2006-11-06 20:18:06 +0000
commit1d50b4263434e1fc631fa4ed200adfb41efc6606 (patch)
treebb6926a29e96b6603e6198970523444f96150757 /java
parentb9cf2c5954ed1f555b1695306197feacf2e1f0a6 (diff)
downloadclasspath-1d50b4263434e1fc631fa4ed200adfb41efc6606.tar.gz
2006-11-06 Tania Bento <tbento@redhat.com>
* java/awt/TextComponent.java (setSelectionStart): Added check.
Diffstat (limited to 'java')
-rw-r--r--java/awt/TextComponent.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/java/awt/TextComponent.java b/java/awt/TextComponent.java
index f811122f2..01eedaf16 100644
--- a/java/awt/TextComponent.java
+++ b/java/awt/TextComponent.java
@@ -391,7 +391,9 @@ public class TextComponent extends Component
*/
public synchronized void setSelectionStart(int selectionStart)
{
- select(selectionStart, getSelectionEnd());
+ select(selectionStart,
+ (getSelectionEnd() < selectionStart)
+ ? selectionStart : getSelectionEnd());
}
/**