Skip to content

Add new preference option 'console.head_padding' #919

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jan 17, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions app/src/processing/app/ui/Editor.java
Original file line number Diff line number Diff line change
Expand Up @@ -2293,8 +2293,10 @@ public void prepareRun() {
internalCloseRunner();
statusEmpty();

// do this to advance/clear the terminal window / dos prompt / etc
for (int i = 0; i < 10; i++) System.out.println();
// Do this to advance/clear the terminal window / dos prompt / etc.
// This may be useful especially when 'console.auto_clear' is false.
int headPadding = Preferences.getInteger("console.head_padding");
for (int i = 0; i < headPadding; i++) console.message("\n", false);

// clear the console on each run, unless the user doesn't want to
if (Preferences.getBoolean("console.auto_clear")) {
Expand Down
10 changes: 9 additions & 1 deletion build/shared/lib/defaults.txt
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,16 @@ console.font.size = 12
# number of lines to show by default
console.lines = 4

# set to false to disable automatically clearing the console
# Number of blank lines to advance/clear console.
# Note that those lines are also printed in the terminal when
# Processing is executed there.
# Setting to 0 stops this behavior.
console.head_padding = 10

# Set to false to disable automatically clearing the console
# each time 'run' is hit
# If one sets it to false, one may also want to set 'console.head_padding'
# to a positive number to separate outputs from different runs.
console.auto_clear = true

# number of days of history to keep around before cleaning
Expand Down
Loading