File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 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) {
14501450 // This must be run in the GUI thread
14511451 SwingUtilities .invokeLater (() -> {
14521452 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
14561457 // For some reason, these are needed. Revalidate says it should be
14571458 // automatically called when components are added or removed, but without
14581459 // it, the component switched to is not displayed. repaint() is needed to
You can’t perform that action at this time.
0 commit comments