The method getViewIndexAtPosition had incorrect conditions for checking
the start and end offset of a View.  This is fixed.

2005-10-25  Anthony Balkissoon  <[EMAIL PROTECTED]>

        * javax/swing/text/CompositeView.java:
        (getViewIndexAtPosition): Fixed boundary conditions (less than and 
        greater than signs were backward).

--Tony
Index: javax/swing/text/CompositeView.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/text/CompositeView.java,v
retrieving revision 1.8
diff -u -r1.8 CompositeView.java
--- javax/swing/text/CompositeView.java	14 Oct 2005 18:16:46 -0000	1.8
+++ javax/swing/text/CompositeView.java	25 Oct 2005 18:51:41 -0000
@@ -437,8 +437,8 @@
     int index = -1;
     for (int i = 0; i < children.length; i++)
       {
-        if (children[i].getStartOffset() >= pos
-            && children[i].getEndOffset() < pos)
+        if (children[i].getStartOffset() <= pos
+            && children[i].getEndOffset() > pos)
           {
             index = i;
             break;
_______________________________________________
Classpath-patches mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/classpath-patches

Reply via email to