Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit ea25c35

Browse files
committed
Fixed EditorConsoleTest on Windows
For some reason the consolePane.getText() method returns the document text with single CR translated into OS native CR+LF. This will influence test outcome since we check various combinations of CR and LF.
1 parent ef5d316 commit ea25c35

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

‎app/src/processing/app/EditorConsole.java‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,13 @@ public void insertString(String str, SimpleAttributeSet attributes) throws BadLo
231231
}
232232

233233
public String getText() {
234-
return consoleTextPane.getText();
234+
try {
235+
return document.getText(0, document.getLength());
236+
} catch (BadLocationException e) {
237+
// Should never happen...
238+
e.printStackTrace();
239+
return "";
240+
}
235241
}
236242

237243
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /