fix(editor): preserve focus after executing SQL
This commit is contained in:
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" />
|
||||
|
||||
Reference in new issue
Block a user