Hi, attached is a patch that fixes the drawing problem I was having when a selection in a jtextarea spanned multiple lines.
The ChangeLog:
2006-03-27 Robert Schuster <[EMAIL PROTECTED]>
* javax/swing/text/PlainView.java:
(drawLine): Use 'endOffset' instead of 'selectionEnd'
for painting the selected line.
cya
Robert
Index: javax/swing/text/PlainView.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/text/PlainView.java,v
retrieving revision 1.40
diff -u -r1.40 PlainView.java
--- javax/swing/text/PlainView.java 27 Mar 2006 13:10:45 -0000 1.40
+++ javax/swing/text/PlainView.java 27 Mar 2006 16:06:47 -0000
@@ -198,7 +198,7 @@
// and ends behind the line: First part unselected, second
// part selected.
x = drawUnselectedText(g, x, y, startOffset, selectionStart);
- drawSelectedText(g, x, y, selectionStart, selectionEnd);
+ drawSelectedText(g, x, y, selectionStart, endOffset);
}
else
// Selection is behind this line: Draw completely unselected text.
signature.asc
Description: OpenPGP digital signature
