fix(editor): preserve sql tab scroll position

This commit is contained in:
t8y2 committed 2026-06-09 18:04:03 +08:00
1 parent 2050bee75c
commit e153d88091
6 files changed
+58

No files matched your search

+7
View File
@@ -523,6 +523,12 @@ export const useQueryStore = defineStore("query", () => {
}
}
function updateEditorViewport(id: string, viewport: { scrollTop: number; scrollLeft: number }) {
const tab = tabs.value.find((t) => t.id === id);
if (!tab) return;
tab.editorViewport = viewport;
}
function renameTab(id: string, title: string) {
const trimmed = title.trim();
if (!trimmed) return false;
@@ -1746,6 +1752,7 @@ export const useQueryStore = defineStore("query", () => {
releaseConnectionTabs,
releaseDatabaseTabs,
updateSql,
updateEditorViewport,
renameTab,
openObjectBrowser,
openUserAdmin,