Skip to content
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

Selecting sketch file with double-click results in duplicate tabs #656

Closed
per1234 opened this issue Dec 2, 2021 · 3 comments · Fixed by #1012 or #1024
Closed

Selecting sketch file with double-click results in duplicate tabs #656

per1234 opened this issue Dec 2, 2021 · 3 comments · Fixed by #1012 or #1024
Assignees
Labels
conclusion: resolved Issue was resolved criticality: high Of high impact 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

Arduino sketches may consist of multiple files, which are shown in the Arduino IDE as tabs. The "Search" and "Sketchbook" side bar panels allow the selection of the active tab by clicking on its sketch file.

When this selection is done under the following conditions:

  • The tab has not been selected since the sketch was opened
  • The selection is done via a double-click rather than a single click

🐛 Instead of selecting the tab as expected, a duplicate tab is opened.

To Reproduce

  1. Open a multiple file sketch in the Arduino IDE.
    The following sketch is provided for the demonstration: MultipleFiles.zip
  2. Open the "Search" side bar panel by clicking the magnifying glass icon.
  3. Search for the text hello
    There will be a search result in each of the files of the demo sketch.
  4. Double click on a search from either of the tabs other than the one that is currently selected in the editor.
    For example, if the "SomeTab2.ino" tab is selected, then double-click the search result in the "MultipleFiles.ino" or "SomeTab2.ino" tabs.

🐛 There are now two tabs for the file associated with the search result you clicked:

image

Expected behavior

Clicking a file of a currently open sketch in a sidebar panel always selects its tab.

Each sketch file only ever gets a single tab in the editor.

Desktop

Original report

  • 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-2f9bf86
    Date: 2022-02-11T14:52:06.341Z
    CLI Version: 0.21.0 [10107d24]

Additional context

🐛 The equivalent procedure will also produce duplicate tabs when using the "Sketchbook" side bar panel.

@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
@ubidefeo ubidefeo added the criticality: high Of high impact label Feb 16, 2022
@fstasi fstasi assigned msujew and unassigned fstasi Apr 1, 2022
@fstasi

This comment was marked as off-topic.

@per1234
Copy link
Contributor Author

per1234 commented May 9, 2022

Bug is still not fixed so this must remain open.

@heliophagus
Copy link

On IDE 2.0.3, I ALWAYS get multiple tabs whenever I open ANY .INO files. Changes made in one tab are reflected in the other tab, so it isn't a huge issue, but it IS annoying.

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