newTab: unintended behavior on creation
Split from #363 (closed)
Relevant comments:
When I have a tab with information and an empty tab, if I try to open a new tab from the second one, it acts as expected. If I do it from the non-empty tab, it creates a new tab (despite one already existing). The expected behavior would be to switch to the already existing empty tab, right? So, when you click the newTab button it would be something like:
if (emptyTab.Exists) { if (selectedTab.IsEmpty) showMessage('Already open'); else selectedTab <= emptyTab; } else openNewTab();
Something crude to express what I think the wanted behavior is
That sounds like a good idea, as there is actually another aspect to that one: files that are already on disk but are empty get closed as well when opening a new view, which is pretty unexpected.
Oh right, it doesn't check if ev.file_name is set, that should be done most definitely
(sorry, couldn't think of a better title)