Editor: Disabling Collapse of Tabs on Double-Click
Show older comments
When using the docked editor in MATLAB, you can snap different files to different parts of the editor (e.g. have them side by side, above-below and so forth).
The problem is that when you double click on one of the tabs, frequently unintentionally, all of the docked windows collapse into a single view (i.e. they are no longer side by side).
When you are working on multiple files at once and have them neatly arranged, having them all suddenly collapse and loose order is highly frustrating. Is there any way to disable this double-click shortcut?
8 Comments
Aaron Kaw
on 23 Feb 2022
I'd also love to disable this. Can't find anything in the settings. It's incredibly frustrating, especially when I have many tabs distributed across multiple windows.
Alain
on 14 Sep 2022
This is probably my most desired feature for the time beeing... It is super irritating when it happens and you are working on some complex classes.
It actually took me some time before I understood the collapsing was related to the tab double click event... But even now that I know it, it still happens inadvertently from time to time... It just did now.... Argh...
Adam
on 14 Sep 2022
I agree, I find this immensely irritating. I have only ever done it by accident, never because I wanted to, and so much by accident that I never even isolated what it was I had done to trigger the behaviour!
Jonathan Hadida
on 16 Apr 2023
Edited: Jonathan Hadida
on 16 Apr 2023
It would be great to have an answer to this — the answer below doesn't actually disable the double-click behavior.
Similarly to Adam, I have only ever done this by accident and would like to be able to disable the collapse of tab layout in the editor altogether if possible.
Matthew Smith
on 2 Nov 2023
I agree that this is a huge irritating problem and creates a lot of work for us. This feature either needs to be removed outright or at least have the option to remove it. When I double click on a file in the file list tab it seems like it should just pop into one of the tabs but instead it ruins your whole layout. Because the actual behavior is so unintuitive it is really hard to learn.
Benjamin Tessler
on 15 Jul 2025
Solution:
Double click on the original tab you accidentally clicked. It will revert it all back.
Side Note:
Had chatgpt figure this out, not sure how it knew since this was the only thread of this.
Thomas Carpenter
on 15 Jul 2025
Benjamin Tessler
on 15 Jul 2025
@Thomas Carpenter 2025a
I actually just made some functions related to this. The getTabs is only for 2025a, I think. But if you have the filenames as a cell array you can use the other functions to reopen the tabs.
Answers (2)
vamshi sai yele
on 14 Sep 2022
0 votes
Hello,
I understood that you want to retain the tailored view and don not want to miss it as it takes lot of time to set things back into the place.
I can certainly understand how frustrating it is because even I have faced the same issue in the beginning, but thanks to MATLAB, it gave an option to save our tailored view and can get back to it with a single click.
Here are the steps to get that done. Firstly, set up the MATLAB view you wish to have on your screen like placing different MATLAB windows in different positions.
I would like to add a point here to make a customized view in a simple way.
In the "View" panel, there are good number of options to tailor MATLAB view as required.

Without struggling much in dragging things on the screen to set up the position, instead we can try those options like "Custom" windows or "Left/Right" and "Top/Bottom" and "Tab Position" and "SPLIT DOCUMENT" options. Just in case if you want to have all the files in single editor window without any customization, simply click on "Single" option at the left corner.
So, coming to our original discussion of having the customized view handy, once you tailor the view as per your requirements, got to "Home" and click on "Layout" to see the available options. Among them select the "Save Layout" and give a name to the layout. Now everything is set to go.

From now on, to get back to your favourite view, just click on the laylout option and select the saved one and MATLAB will fall into your favourite customized view.
Hope you will find it helpful!
1 Comment
Alain
on 14 Sep 2022
Thanks. I just tried your suggestion but I am afraid that the positions of the docked windows inside the editor are not included in the saved layouts. Just tried it. Saved my layout as per your suggestion, double-clicked one tab in the editor (all docked tabs got undocked as sadly expected). Reloading my saved layout did unfortunatelly not restore the original tabs location inside the editor...
Being able to save the layout of the tabs in the editor would be a cool feature... But simply being able to diasable the double-click event on the editor tabs would be a good-enough start for me.
Nicholas
on 4 Mar 2026
0 votes
Using 2025b, I can just double-click the tab again and it snaps back to whatever layout I had before.
Categories
Find more on Graphics Performance in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!