From c26f7f5ebc01a2fb5cd7880c62cd28bee5e03b07 Mon Sep 17 00:00:00 2001 From: Andrew Bastin Date: Mon, 13 Sep 2021 09:18:37 +0530 Subject: [PATCH] fix: autocompletion eating non-identifier tokens --- helpers/editor/codemirror.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/helpers/editor/codemirror.ts b/helpers/editor/codemirror.ts index b1ad665fb..4eba68538 100644 --- a/helpers/editor/codemirror.ts +++ b/helpers/editor/codemirror.ts @@ -97,6 +97,9 @@ export function useCodemirror( const text = editor.getValue() const token = editor.getTokenAt(pos) + // It's not a word token, so, just increment to skip to next + if (token.string.toUpperCase() === token.string.toLowerCase()) + token.start += 1 const result = await options.completer!(text, pos)