File tree 1 file changed +4
-3
lines changed
1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -1450,9 +1450,10 @@ public void selectTab(final int index) {
1450
1450
// This must be run in the GUI thread
1451
1451
SwingUtilities .invokeLater (() -> {
1452
1452
codePanel .removeAll ();
1453
- codePanel .add (tabs .get (index ), BorderLayout .CENTER );
1454
- tabs .get (index ).requestFocusInWindow (); // get the caret blinking
1455
- tabs .get (index ).applyPreferences ();
1453
+ EditorTab selectedTab = tabs .get (index );
1454
+ codePanel .add (selectedTab , BorderLayout .CENTER );
1455
+ selectedTab .applyPreferences ();
1456
+ selectedTab .requestFocusInWindow (); // get the caret blinking
1456
1457
// For some reason, these are needed. Revalidate says it should be
1457
1458
// automatically called when components are added or removed, but without
1458
1459
// it, the component switched to is not displayed. repaint() is needed to
You can’t perform that action at this time.
0 commit comments