From 6b7f4e6ddbc4e594a17960869ab08efb3b1a9a9d Mon Sep 17 00:00:00 2001 From: Cullie Date: Wed, 25 Aug 2021 08:55:53 +1000 Subject: [PATCH] #41 - autocomplete entire value rather than value up to cursor --- src/YarnSpinner/yarnSpinnerCompletions.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/YarnSpinner/yarnSpinnerCompletions.js b/src/YarnSpinner/yarnSpinnerCompletions.js index ef7e9c9..8273bbb 100644 --- a/src/YarnSpinner/yarnSpinnerCompletions.js +++ b/src/YarnSpinner/yarnSpinnerCompletions.js @@ -81,7 +81,7 @@ export const completions = { }]; //Get all of the text in the editor - var text = model.getValueInRange({startLineNumber: 1, startColumn: 1, endLineNumber: position.lineNumber, endColumn: position.column}); + var text = model.getValue(); //Regex for both titles and variables, global tag is used. var nodesRegex = /Title:\s?[A-Za-z0-9_]+[\.]*[A-Za-z0-9_]*/g; var variablesRegex = /\$[A-Za-z0-9_]+[\.]*[A-Za-z0-9_]*/g;