Skip to content

Editor view for previous sketch not loaded after exit with non-sketch tab open #658

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
per1234 opened this issue Dec 2, 2021 · 1 comment · Fixed by #1024
Closed

Editor view for previous sketch not loaded after exit with non-sketch tab open #658

per1234 opened this issue Dec 2, 2021 · 1 comment · Fixed by #1024
Assignees
Labels
conclusion: resolved Issue was resolved topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project

Comments

@per1234
Copy link
Contributor

per1234 commented Dec 2, 2021

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

  1. Select File > New from the Arduino IDE menus.
  2. Select File > Save As... from the Arduino IDE menus.
  3. 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.
  4. Select File > Advanced > Keyboard Shortcuts from the Arduino IDE menus.
    The "Keyboard Shortcuts" tab opens.
  5. Select File > Quit from the Arduino IDE menus.
  6. Start the Arduino IDE

🐛 The sketch content is not shown in editor tabs as expected. Instead, there is only an empty space:

image

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.

@per1234 per1234 added topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project labels Dec 2, 2021
@per1234 per1234 changed the title Sketch not loaded after exit with non-sketch tab open Editor view for previous sketch not loaded after exit with non-sketch tab open Feb 16, 2022
@per1234
Copy link
Contributor Author

per1234 commented Jun 11, 2022

Closing as fixed by #1024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conclusion: resolved Issue was resolved topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project
Projects
None yet
2 participants