Skip to content

Commit

Permalink
Scroll to the top for text result
Browse files Browse the repository at this point in the history
  • Loading branch information
dzmipt committed Nov 1, 2024
1 parent cd157af commit d8573c7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ dependencies {
implementation group: 'org.apache.logging.log4j', name: 'log4j-core', version: '2.20.0'
implementation group: 'org.apache.logging.log4j', name: 'log4j-iostreams', version: '2.20.0'

implementation group: 'com.fifesoft', name: 'rsyntaxtextarea', version: '3.3.4'
implementation group: 'com.fifesoft', name: 'rsyntaxtextarea', version: '3.5.1'
//see studio.ui.chart.patched folder for the patch for jfreechart.
// It will require review during the jfreechart upgrade.
implementation group: 'org.jfree', name: 'jfreechart', version: '1.5.3'
Expand Down
2 changes: 2 additions & 0 deletions src/studio/ui/TabPanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,8 @@ private void updateFormatting() {
text = Util.limitString(result.toString(formatContext), Config.getInstance().getMaxCharsInResult());
}
textArea.setText(text);
textArea.setCaretPosition(0);
textArea.scrollRectToVisible(new Rectangle(0, 0, 1, 1)); // Scroll to top
}
}

Expand Down

0 comments on commit d8573c7

Please sign in to comment.