Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Loading SQL file Replaces current tab instead of opening a new one. Never warns of unsaved data. #270
Steps to reproduce this issue
The current tab gets completely replaced without warning, losing all content (saved or not).
The loaded file should open in ANOTHER tab, never replacing the current one. That is completely anti-intuitive and may lead to lost data.
Never replace current tab with loaded files, always open them in new tabs, and let the already open tabs as they are.
I've noticed that if you drag and drop a file into Heidi (into a query tab), it gets loaded in the first 'empty' tab (any tab that has no content yet), and if there is no empty tab, the file gets loaded into a tab of its own.
It is a better behavior than when loading files via the "Load SQL file..." option (the issue I describe), because it never clears unsaved content neither closes (substitutes) current tabs.
Maybe you could implement it in such way that opening files via menus (or Ctrl+O), has the same effect as dragging them into the app.
The only bug with dragging is that if the file loads in a currently empty but unfocused tab, such tab doesn't get the focus with the new content.