Hi Tony,
On Thu, 2006-01-05 at 15:16 -0500, Anthony Balkissoon wrote:
> diff -u -r1.26 DefaultCaret.java
> --- javax/swing/text/DefaultCaret.java 22 Nov 2005 16:10:27
> -0000 1.26
> +++ javax/swing/text/DefaultCaret.java 5 Jan 2006 20:13:58 -0000
> @@ -829,9 +829,12 @@
> public void setDot(int dot)
> {
> if (dot >= 0)
> - {
> + {
> + Document doc = textComponent.getDocument();
> + if (doc != null)
> + this.dot = Math.min(dot, doc.getLength());
> + this.dot = Math.max(dot, 0);
> this.mark = dot;
> - this.dot = dot;
> handleHighlight();
> adjustVisibility(this);
> appear();There seems to be some confusion here between dot the parameter and this.dot. if doc != null you probably want to set the parameter dot to Math.min(dot,etc) since you will override this.dot immediately after that assignment. Cheers, Mark
signature.asc
Description: This is a digitally signed message part
_______________________________________________ Classpath-patches mailing list [email protected] http://lists.gnu.org/mailman/listinfo/classpath-patches
