From 38c581b226d6583f0578af6ba4073bf0d52e6d0c Mon Sep 17 00:00:00 2001 From: sergeyteleshev Date: Tue, 17 Dec 2024 18:17:08 +0100 Subject: [PATCH] CB-5448 cleanup --- .../src/SQLEditor/useSqlDialectAutocompletion.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/webapp/packages/plugin-sql-editor-new/src/SQLEditor/useSqlDialectAutocompletion.ts b/webapp/packages/plugin-sql-editor-new/src/SQLEditor/useSqlDialectAutocompletion.ts index 76a594d228..5c913ff203 100644 --- a/webapp/packages/plugin-sql-editor-new/src/SQLEditor/useSqlDialectAutocompletion.ts +++ b/webapp/packages/plugin-sql-editor-new/src/SQLEditor/useSqlDialectAutocompletion.ts @@ -79,9 +79,10 @@ export function useSqlDialectAutocompletion(data: ISQLEditorData): [Compartment, const proposals = await optionsRef.data.getHintProposals(startPos, !context.explicit); const limitIsMet = optionsRef.data.hintsLimitIsMet; const options = getOptionsFromProposals(context.explicit, word.text, proposals); + const from = proposals[0]?.replacementOffset ?? word.from; const result: CompletionResult = { - from: proposals[0]?.replacementOffset ?? word.from, + from, options, update(current, from, to, context) { if (startPos > context.pos) {