fix(editor): preserve sql tab cursor state
This commit is contained in:
1 parent
80531c8765
commit
426b7911bc
6 files changed
+78
-2
No files matched your search
@@ -529,6 +529,12 @@ export const useQueryStore = defineStore("query", () => {
|
||||
tab.editorViewport = viewport;
|
||||
}
|
||||
|
||||
function updateEditorSelection(id: string, selection: { anchor: number; head: number }) {
|
||||
const tab = tabs.value.find((t) => t.id === id);
|
||||
if (!tab) return;
|
||||
tab.editorSelection = selection;
|
||||
}
|
||||
|
||||
function renameTab(id: string, title: string) {
|
||||
const trimmed = title.trim();
|
||||
if (!trimmed) return false;
|
||||
@@ -1753,6 +1759,7 @@ export const useQueryStore = defineStore("query", () => {
|
||||
releaseDatabaseTabs,
|
||||
updateSql,
|
||||
updateEditorViewport,
|
||||
updateEditorSelection,
|
||||
renameTab,
|
||||
openObjectBrowser,
|
||||
openUserAdmin,
|
||||
|
||||
Reference in new issue
Block a user