提交 414b0d51 编写于 作者: C CyrusNajmabadi

Ensure we actually update the document.

上级 e81c9df8
......@@ -136,9 +136,9 @@ Namespace Microsoft.CodeAnalysis.Editor.VisualBasic.Utilities.CommandHandlers
Dim caretOffsetFromToken = caretPosition - token.Span.End
Dim tokenAnnotation As New SyntaxAnnotation()
Dim newRoot = syntaxRoot.ReplaceToken(token, token.WithAdditionalAnnotations(tokenAnnotation))
document = document.WithSyntaxRoot(newRoot)
token = newRoot.GetAnnotatedNodesAndTokens(tokenAnnotation).First().AsToken()
document = document.WithSyntaxRoot(syntaxRoot.ReplaceToken(token, token.WithAdditionalAnnotations(tokenAnnotation)))
token = document.GetSyntaxRootSynchronously(cancellationToken).
GetAnnotatedNodesAndTokens(tokenAnnotation).First().AsToken()
Dim typeSyntax = token.GetAncestor(Of TypeSyntax)()
If typeSyntax Is Nothing Then
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册