Has anyone had this issue with IDE 2.0 running in W11. I go to save the sketch as something and a window pops up telling to "do you want to close without saving" blah blah! I was trying to save it "dumb machine" ugg. When I look in the folders I see the title I gave it but nothing in the folder when you recall it into IDE.
If so any fixes yet?
BTW: when I save it as whatever it doesn't feed back to IDE and change the working title of my program either.
Hi @nilocenots . Thanks for giving the Arduino IDE 2.0.0 release candidate a try.
This is a known bug, which is tracked by the developers here:
opened 04:13PM - 25 Feb 21 UTC
closed 04:01AM - 10 Mar 22 UTC
priority: high
conclusion: resolved
topic: code
type: imperfection
criticality: medium
## Describe the bug
If a "Save As..." is done when the sketch is in an unsave… d (AKA "dirty") state, the IDE presents an unexpected "**Are you sure you want to close the sketch?**" dialog.
Regardless of which choice the user selects in the dialog, the resulting sketch files do not contain the unsaved changes that were in the editor.
## To Reproduce
1. Select **File > Preferences** from the Arduino IDE menus.
1. Uncheck the box next to "**☐ Auto save**"
1. Click the <kbd>OK</kbd> button.
1. Select **File > New** from the Arduino IDE menus.
1. Make some change to the sketch and do not save.
1. Select **File > Save As...** from the Arduino IDE menus.
1. Click the <kbd>Save</kbd> button.
An "Are you sure you want to close the sketch?" message is shown unexpectedly, since you did not do anything that would be considered a close operation.
1. Click the <kbd>Yes</kbd> button.
The IDE window now closes.
1. Open the sketch you saved via the "Save As..." operation.
1. Check whether the change you made is present.
It is not!
1. Select **File > Save As...** from the Arduino IDE menus.
1. Click the <kbd>Save</kbd> button.
An "Are you sure you want to close the sketch?" message is shown unexpectedly, since you did not do anything that would be considered a close operation.
1. Click the <kbd>No</kbd> button.
1. Open the sketch you saved via the "Save As..." operation.
1. Check whether the change you made is present.
It is not!
## Expected behavior
The exact contents of the sketch that is open in the editor are always saved to the sketch specified via the "Save As..." operation, regardless of dirty state.
No "**Are you sure you want to close the sketch?**" dialog is shown during this procedure.
The currently open sketch is replaced by the new sketch created by the "Save As..." process, just as it does after "Save As..." with a non-dirty sketch.
## Desktop
- OS: Windows 10
- Version: 2.0.0-rc1-snapshot.be55a0a
Date: 2021-12-03T11:09:57.266Z
CLI Version: 0.20.1 [abb21449]
## Additional context
[ originally reported by @per1234 ]
If you have a GitHub account, you can subscribe to that issue to get notifications of any new developments related to this subject.
system
Closed
July 28, 2022, 3:09pm
4
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.