-
-
Notifications
You must be signed in to change notification settings - Fork 487
Description
Describe the problem
By default, Arduino IDE's "Auto save" preference is enabled. This causes changes made to a sketch in the Arduino IDE editor to be automatically saved soon after the user makes them.
The user may prefer to control if and when changes are saved, in which case they will disable this preference.
The IDE must communicate to the user when the sketch is in an unsaved (AKA "dirty") state. Currently this is done by appending a ⬀ symbol to the title of the tab containing unsaved changes. A common convention in applications is also to indicate the state via the window title. A sophisticated template-based window title customization capability is available by the window.title
advanced setting, which promises to provide such a capability via the ${dirty}
variable:
${dirty}
: an indicator for when the active editor has unsaved changes.
π An unsaved indicator is not added in the window title if the user adds a ${dirty}
variable to their custom window title template in the window.title
advanced setting
To reproduce
- Press the Ctrl+Shift+P keyboard shortcut (Command+Shift+P for macOS users) to open the "Command Palette".
- Select the "Preferences: Open Settings (UI)" command from the menu.
- A "Preferences" tab will now open in the Arduino IDE main panel. In the "Search Settings" field, type
window.title
- Change the content of the field under the "Title" setting to:
${dirty}${rootName}${activeEditorShort}${appName}
- Select File > Preferences from the Arduino IDE menus.
- Uncheck the checkbox next to the "
β
Auto save" preference. - Click the "OK" button.
- Make a change to the sketch content in the Arduino IDE editor.
π No "dirty" indicator appears on the window title:
Expected behavior
"Dirty" indicator is shown in window title if the window.title
setting contains ${dirty}
and selected editor tab is in an unsaved state.
Arduino IDE version
Operating system
Windows
Operating system version
10
Additional context
The setting works as expected in Theia Blueprint 1.31.1 (same version of Theia as in use by Arduino IDE):
This indicates to me the problem is caused by something in the Arduino IDE codebase.
Other customizations made to the window.title
setting take effect as expected, so the general feature is functional.
Related reports
Issue checklist
- I searched for previous reports in the issue tracker
- I verified the problem still occurs when using the latest nightly build
- My report contains all necessary details