Can't close tab

When you open a file in a new tab in the IDE, you are unable to close that tab, ever. File, Close closes the entire project, not just the tab you are on.

That sounds like it is working as intended. The IDE will show a tab for each file in the sketch directory so you cannot close it

I have opened tabs on files that are not in the sketch directory, by right-clicking on include statements and choosing "Go to definition". Incredibly handy, but no way to close the window that opens.

When such a tab opens to show you the definition the tab should have the usual 'X' on it to close the tab
image

2 Likes

I discovered the X appears when I select the tab. I had looked at tabs that I hadn't selected and didn't see the X. (The tab I did have selected was a file that was part of the project itself and so it didn't have an X, and it never occurred to me that by selecting a different tab of a non-project file, an X might appear).

Thanks.

1 Like

It also appears when you hover the mouse pointer over the tab even when it is not selected. VS Code (which the design of Arduino IDE somewhat parallels due to using a related framework) has the same behavior.

Hello,

I made the mistake of ctrl+alt+click on a method. it opened a new tab with a duplicate of the existing tab. I cannot close it, even when I restart the app. There is no 'x' on the tab when i select it. see image. CANBus.h is already open in the left set of tabs. Please advise!

Hi @aggrav8d. Thanks for your report. I'll provide instructions you can follow to close these split editor panels:

  1. Press the Ctrl+Shift+P keyboard shortcut (Command+Shift+P for macOS users) to open the "Command Palette".
    A menu will appear on the editor toolbar:
    image
  2. Select the "View: Reset Workbench Layout" command from the menu.
    You can scroll down through the list of commands to find it or type the name in the field.
3 Likes

Thank you, that worked.

You are welcome.

I submitted a formal bug report to the Arduino IDE developers on your behalf:

Thanks for bringing this to our attention.

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.