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,
currentThemeDefinition,
currentEditorKeybindigMode,
getCurrentSettings
} from '../stores';
import _ from 'lodash';
import { handleCommandKeyDown } from '../commands/CommandListener.svelte';
@@ -212,11 +213,18 @@
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 {
text: editor.session.getLine(line),
line,
text: editor.getValue(),
};
}
export function getCodeCompletionCommandText() {

View File

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