[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[cp-patches] fixing the JTextArea.replaceRange
From: |
Meskauskas Audrius |
Subject: |
[cp-patches] fixing the JTextArea.replaceRange |
Date: |
Sat, 26 Feb 2005 20:00:58 +0100 |
The Mauve test gnu.testlet.javax.swing.JTextArea.text indicates the
incorrect work of the text replacement methods in JTextArea. For example, if
the string is "0123456789", the replaceRange(3,5, "replacement") should
result the "012replacement56789" and surely not "012replacement89" as it
does.
The problem was that the author of the replaceRange method have
misinterpreted the meaning of the second parameter in the doc.remove(int,
int). This is the length of the segment being removed and not the absolute
bound of the range being removed.
The problem can be esily fixed by correcting this method.
Audrius Meskauskas
JTextArea.java.diff
Description: Binary data
- [cp-patches] fixing the JTextArea.replaceRange,
Meskauskas Audrius <=