diff --git a/app/src/processing/app/FindReplace.java b/app/src/processing/app/FindReplace.java index 1c3b380d9..116d8fa5c 100644 --- a/app/src/processing/app/FindReplace.java +++ b/app/src/processing/app/FindReplace.java @@ -421,8 +421,11 @@ public class FindReplace extends JFrame implements ActionListener { public void replaceAll() { if (findField.getText().length() == 0) return; - // move to the beginning - editor.setSelection(0, 0); + + if (searchAllFiles) + editor.getSketch().setCurrentCode(0); // select the first tab + + editor.setSelection(0, 0); // move to the beginning boolean foundAtLeastOne = false; while (true) {