Refactor SQL editor to integrate word wrap settings and remove redundant options in QueryTab

This commit is contained in:
Stela Augustinova
2025-12-15 12:44:04 +01:00
parent 21352dae07
commit a503898b21
2 changed files with 4 additions and 4 deletions

View File

@@ -12,7 +12,7 @@
import useEffect from '../utility/useEffect';
import { getContext } from 'svelte';
import { mountCodeCompletion } from './codeCompletion';
import { getCurrentSettings } from '../stores';
import { currentEditorWrapEnabled, getCurrentSettings } from '../stores';
export let engine = null;
export let conid = null;
export let database = null;
@@ -29,6 +29,8 @@
mode = engineToMode[match ? match[1] : engine] || 'sql';
}
$: enableWrap = $currentEditorWrapEnabled || false;
export function getEditor(): ace.Editor {
return domEditor.getEditor();
}
@@ -63,5 +65,6 @@
options={{
...$$props.options,
enableBasicAutocompletion: true,
wrap: enableWrap,
}}
/>

View File

@@ -720,9 +720,6 @@
...driver?.getQuerySplitterOptions('editor'),
splitByEmptyLine: !$settingsValue?.['sqlEditor.disableSplitByEmptyLine'],
}}
options={{
wrap: enableWrap,
}}
value={$editorState.value || ''}
menu={createMenu()}
on:input={e => {