Fixes a bug causing newlines to disappear when a console is truncated
All checks were successful
KnarCraft/Minecraft-Server-Launcher/pipeline/head This commit looks good

This commit is contained in:
Kristian Knarvik 2021-08-26 14:19:40 +02:00
parent e8ecee1cd0
commit 849655bfc6

View File

@ -93,7 +93,7 @@ public class Console extends KeyAdapter implements ActionListener, KeyListener {
StringBuilder newTextBuilder = new StringBuilder(); StringBuilder newTextBuilder = new StringBuilder();
for (String line : oldTextList) { for (String line : oldTextList) {
if (!line.equals("")) { if (!line.equals("")) {
newTextBuilder.append(line); newTextBuilder.append(line).append("\n");
} }
} }
this.textOutput.setText(newTextBuilder.toString()); this.textOutput.setText(newTextBuilder.toString());