fix(editor): preserve focus after executing SQL

This commit is contained in:
zipg authored and GitHub committed 2026-08-05 09:44:00 +08:00
1 parent 39fcaa15cb
commit 0dfc6b5cd8
3 files changed
+10

No files matched your search

@@ -623,6 +623,7 @@ function emitExecutionRequest(source: SqlExecutionOverride, openInNewResultTab =
function requestExecute(options: RequestExecuteOptions = {}) {
const currentView = view.value;
if (!currentView) return false;
currentView.focus();
return requestExecuteFromView(currentView, currentView.state.selection.main.head, options);
}
@@ -229,6 +229,7 @@ async function changeCatalog(selectedCatalog: string) {
class="h-6 w-6"
:class="executeButtonClass"
:disabled="activeTab.isCancelling || activeTab.isExplaining || (!activeTab.isExecuting && !executableSql.trim())"
@mousedown.prevent
@click="activeTab.isExecuting ? emit('cancel') : emit('execute')"
>
<Loader2 v-if="activeTab.isCancelling" class="h-3.5 w-3.5 animate-spin" />