On Thu, 27 Mar 2025 20:48:22 GMT, Naoto Sato <na...@openjdk.org> wrote:

>> src/jdk.internal.le/share/classes/jdk/internal/console/SimpleConsoleReader.java
>>  line 198:
>> 
>>> 196: 
>>> 197:             if (it.hasNext()) {
>>> 198:                 out.append("\n\r");
>> 
>> I understand this is a simple console, but do we want to CR/LF/CRLF based on 
>> the platform?
>
> `line.seprator` system property can be used here

When the terminal is in the raw/unprocessed mode, I believe `\n` is only moving 
the cursor to the next line (without changing the column), and `\r` is doing 
carriage return. So, to move the cursor to the first character of the next 
line, both are needed.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/24242#discussion_r2021410890

Reply via email to