From 2e3cdd1b977153952e20e7fa46f83653612dce92 Mon Sep 17 00:00:00 2001 From: dej611 Date: Mon, 7 Jun 2021 11:36:03 +0200 Subject: [PATCH] :bug: Move the cursor just next to new inserted text --- .../operations/definitions/formula/editor/formula_editor.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/formula/editor/formula_editor.tsx b/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/formula/editor/formula_editor.tsx index 95049eaf6f2f3..8d17d464f8c7c 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/formula/editor/formula_editor.tsx +++ b/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/formula/editor/formula_editor.tsx @@ -426,7 +426,7 @@ export function FormulaEditor({ } let editOperation: monaco.editor.IIdentifiedSingleEditOperation | null = null; - let cursorOffset = 2; + const cursorOffset = 2; if (char === '=') { editOperation = { range: { @@ -448,7 +448,6 @@ export function FormulaEditor({ }, text: `\\'`, }; - cursorOffset = 3; } if (editOperation) {