feat(sql-library): show matching line snippets with jump in search
This commit is contained in:
1 parent
eeeb67e62c
commit
51f9dfc854
19 files changed
+686
-106
No files matched your search
@@ -212,8 +212,9 @@ interface BuildQueryResultExportRequestOptions {
|
||||
insertMode?: SqlInsertMode;
|
||||
}
|
||||
|
||||
interface OpenSavedSqlOptions {
|
||||
export interface OpenSavedSqlOptions {
|
||||
targetMode?: SavedSqlOpenTargetMode;
|
||||
reveal?: { line: number; column?: number };
|
||||
}
|
||||
|
||||
interface OpenObjectSourceTabOptions {
|
||||
@@ -5432,6 +5433,9 @@ export const useQueryStore = defineStore("query", () => {
|
||||
existing.editorViewport = restored.viewport;
|
||||
}
|
||||
applySavedSqlExecutionTarget(existing, target);
|
||||
if (options.reveal) {
|
||||
existing.editorRevealRequest = { id: ++contentRevealSeq, line: options.reveal.line, column: options.reveal.column };
|
||||
}
|
||||
switchTab(existing.id);
|
||||
return existing.id;
|
||||
}
|
||||
@@ -5455,6 +5459,7 @@ export const useQueryStore = defineStore("query", () => {
|
||||
isExplaining: false,
|
||||
mode: "query",
|
||||
autoCommit: defaultAutoCommitForDbTypeWithSetting(dbType),
|
||||
editorRevealRequest: options.reveal ? { id: ++contentRevealSeq, line: options.reveal.line, column: options.reveal.column } : undefined,
|
||||
editorSelection: restoredPosition.selection,
|
||||
editorViewport: restoredPosition.viewport,
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user