Closed
Description
Describe the bug
🐛 After doing a "File > Save As..." operation, the board selection changes back to whichever one happened to be selected when the sketch was opened.
To Reproduce
- Select File > New from the Arduino IDE menus.
- Select File > Save As... from the Arduino IDE menus.
- Save the sketch to some convenient location.
🛈 The issue occurs when the previous sketch is opened after a restart, so a saved sketch is used in this demo since the File > New-generated sketch exists only in a temporary folder and thus is subject to cleanup by the OS after exit. - Select File > Advanced > Keyboard Shortcuts from the Arduino IDE menus.
The "Keyboard Shortcuts" tab opens. - Select File > Quit from the Arduino IDE menus.
- Start the Arduino IDE
🐛 The sketch content is not shown in editor tabs as expected. Instead, there is only an empty space:
Expected behavior
Sketch files are always loaded in the IDE editor.
Desktop
Original
- OS: Windows 10
- Version: 2.0.0-rc1-snapshot.f0d9894
Date: 2021-11-30T16:25:41.414Z
CLI Version: 0.20.1 [abb21449]
Last checked with
- OS: Windows 10
- Version: 2.0.0-rc3-snapshot-9ecff86
Date: 2022-02-15T15:53:31.454Z
CLI Version: 0.21.0 [10107d24]
Additional context
The same occurs if the IDE is closed with "Preferences" tab open (the one accessed via the "Preferences: Open User Settings" command. This makes me suspect that any non-sketch tab will trigger this behavior.