提交 81fac63f 编写于 作者: C Cyrus Najmabadi

Fix

上级 73c3c98f
......@@ -185,12 +185,17 @@ private async Task CheckTokenAsync(CodeFixContext context, Document document, Sy
}
}
private static readonly char[] s_punctuation = new[] { '(', '[', '<' };
private static async Task<string> GetInsertionTextAsync(Document document, CompletionItem item, TextSpan completionListSpan, CancellationToken cancellationToken)
{
var service = CompletionService.GetService(document);
var change = await service.GetChangeAsync(document, item, completionListSpan, commitCharacter: null, cancellationToken).ConfigureAwait(false);
return change.TextChange.NewText;
var text = change.TextChange.NewText;
var nonCharIndex = text.IndexOfAny(s_punctuation);
return nonCharIndex > 0
? text[0..nonCharIndex]
: text;
}
private SpellCheckCodeAction CreateCodeAction(SyntaxToken nameToken, string oldName, string newName, Document document)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册