RFR: 8180276: JTextPane getText return extra when mixed with methods of Document [v3]

Prasanta Sadhukhan psadhukhan at openjdk.java.net
Fri Apr 8 11:34:42 UTC 2022


On Fri, 8 Apr 2022 11:28:26 GMT, Tejesh R <duke at openjdk.java.net> wrote:

>> So, presently it was writing <String>/r/n/r/n and with fix, it will write <String>/r/n, right?
>
> No, presently it was writing /r/r/n and with fix it will write /r/n for every line ending...... /r was causing for carriage return and /r/n for an extra empty line on Text pane.......

But should /r/r/n cause 2 line feeds? /r should be just carriage return to cause caret to move from last column to first, why it is inserting new line?

-------------

PR: https://git.openjdk.java.net/jdk/pull/8122



More information about the client-libs-dev mailing list