Move a tab to another window
functionalSend a query tab to a new or existing window, text, connection and all.
Work across more than one window (File › New Window) and sooner or later a query is in the wrong one. Right-click the query's tab and choose Move to New Window, or Move to Window n to send it to a window that is already open - each entry names that window's current tab so they are easy to tell apart.
What moves with it
- Text
- The full editor contents and caret position, including unsaved edits. A file-backed tab stays attached to its file, dirty marker and all, and keeps watching it for outside changes from where it left off. An unsaved tab brings its query version history with it.
- Connection
- The tab's pinned connection and database. The receiving window switches to it when the tab arrives, exactly as if you had focused the tab there.
- Results
- The result sets come along as a read-only snapshot under a Results moved from another window banner. A very large result (one that was paged from disk) brings only its first 100,000 rows, and the banner says so. Run the query again for live, editable results.
- Name
- The tab's name, pinned state, and whether you renamed it yourself.
- Auto-refresh
- A tab set to re-run on an interval keeps that interval in its new window.
- Parameters
- Values typed into the query-parameter strip (the
-- sqlly param:band above the results) come along, including one you were still typing, so the moved query runs with the same values. A parameter left empty stays empty and still falls back to its declared default.
The move is copy-then-close: the tab is created in the target window first and removed from the source window only once that succeeded, so a window closing mid-move never loses a query. The source window keeps nothing: its tab, and its live results, close once the target has the copy. A moved tab does not show up under Reopen Closed Tab in the old window - it was moved, not closed. A new window opened by the move holds just that tab. Move Tab to New Window in the command palette moves the current tab.
Every window saves its tabs into the same workspace session, merged with the tabs the other open windows hold, so after a move both windows' tabs - including unsaved text and the values in each tab's query-parameter strip - come back the next time SQLly starts, all in one window.
