diff --git a/app/src/processing/app/Editor.java b/app/src/processing/app/Editor.java index c1be9b5efa..3b3316f310 100644 --- a/app/src/processing/app/Editor.java +++ b/app/src/processing/app/Editor.java @@ -1450,8 +1450,10 @@ public void selectTab(final int index) { // This must be run in the GUI thread SwingUtilities.invokeLater(() -> { codePanel.removeAll(); - codePanel.add(tabs.get(index), BorderLayout.CENTER); - tabs.get(index).requestFocusInWindow(); // get the caret blinking + EditorTab selectedTab = tabs.get(index); + codePanel.add(selectedTab, BorderLayout.CENTER); + selectedTab.applyPreferences(); + selectedTab.requestFocusInWindow(); // get the caret blinking // For some reason, these are needed. Revalidate says it should be // automatically called when components are added or removed, but without // it, the component switched to is not displayed. repaint() is needed to