From 2c063fa8544a8aac35d2f63ee24eabc7c8747a78 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Thu, 24 Oct 2019 14:40:45 +0200 Subject: [PATCH] ops... --- src/vs/workbench/api/common/extHostTypeConverters.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/vs/workbench/api/common/extHostTypeConverters.ts b/src/vs/workbench/api/common/extHostTypeConverters.ts index 2e5a4a170da..878f588f3f1 100644 --- a/src/vs/workbench/api/common/extHostTypeConverters.ts +++ b/src/vs/workbench/api/common/extHostTypeConverters.ts @@ -821,7 +821,8 @@ export namespace CompletionItem { result.filterText = suggestion.filterText; result.preselect = suggestion.preselect; result.commitCharacters = suggestion.commitCharacters; - result.range = editorRange.Range.isIRange(suggestion.range) ? Range.to(suggestion.range) : { insert: Range.to(suggestion.range.insert), replace: Range.to(suggestion.range.replace) }; + result.range = editorRange.Range.isIRange(suggestion.range) ? Range.to(suggestion.range) : undefined; + result.range2 = editorRange.Range.isIRange(suggestion.range) ? undefined : { insert: Range.to(suggestion.range.insert), replace: Range.to(suggestion.range.replace) }; result.keepWhitespace = typeof suggestion.insertTextRules === 'undefined' ? false : Boolean(suggestion.insertTextRules & modes.CompletionItemInsertTextRule.KeepWhitespace); // 'inserText'-logic if (typeof suggestion.insertTextRules !== 'undefined' && suggestion.insertTextRules & modes.CompletionItemInsertTextRule.InsertAsSnippet) {