Execute Current, Execute Current Line Not Current Query #1209

This commit is contained in:
Stela Augustinova
2025-10-21 14:18:22 +02:00
parent 3804a87cef
commit e1de4f5c5f
2 changed files with 17 additions and 3 deletions

View File

@@ -130,6 +130,7 @@
currentEditorTheme, currentEditorTheme,
currentThemeDefinition, currentThemeDefinition,
currentEditorKeybindigMode, currentEditorKeybindigMode,
getCurrentSettings
} from '../stores'; } from '../stores';
import _ from 'lodash'; import _ from 'lodash';
import { handleCommandKeyDown } from '../commands/CommandListener.svelte'; import { handleCommandKeyDown } from '../commands/CommandListener.svelte';
@@ -212,11 +213,18 @@
line: editor.getSelectionRange().start.row, line: editor.getSelectionRange().start.row,
}; };
} }
const line = editor.getSelectionRange().start.row; if (!getCurrentSettings()['sqlEditor.disableExecuteCurrentLine']){
const line = editor.getSelectionRange().start.row;
return {
text: editor.session.getLine(line),
line,
};
}
return { return {
text: editor.session.getLine(line), text: editor.getValue(),
line,
}; };
} }
export function getCodeCompletionCommandText() { export function getCodeCompletionCommandText() {

View File

@@ -258,6 +258,12 @@ ORDER BY
label="Disable split by empty line" label="Disable split by empty line"
defaultValue={false} defaultValue={false}
/> />
<FormCheckboxField
name="sqlEditor.disableExecuteCurrentLine"
label="Disable current line execution (Execute current)"
defaultValue={false}
/>
</svelte:fragment> </svelte:fragment>
<svelte:fragment slot="2"> <svelte:fragment slot="2">
<div class="heading">Connection</div> <div class="heading">Connection</div>