Skip to content

Commit 246cf30

Browse files
use cancellation token
1 parent b9fed85 commit 246cf30

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/EditorFeatures/VisualBasic/EndConstructGeneration/EndConstructCommandHandler.vb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ Namespace Microsoft.CodeAnalysis.Editor.VisualBasic.EndConstructGeneration
8080

8181
' End construct is not cancellable.
8282
Dim endConstructService = document.GetLanguageService(Of IEndConstructGenerationService)()
83-
endConstructService.TryDo(args.TextView, args.SubjectBuffer, args.TypedChar, CancellationToken.None)
83+
endConstructService.TryDo(args.TextView, args.SubjectBuffer, args.TypedChar, context.OperationContext.UserCancellationToken)
8484
End Sub
8585

8686
Public Function GetCommandState_AutomaticLineEnderCommandHandler(args As AutomaticLineEnderCommandArgs, nextHandler As Func(Of CommandState)) As CommandState Implements IChainedCommandHandler(Of AutomaticLineEnderCommandArgs).GetCommandState
@@ -123,7 +123,7 @@ Namespace Microsoft.CodeAnalysis.Editor.VisualBasic.EndConstructGeneration
123123
textView, subjectBuffer, document, cancellationToken).ConfigureAwait(True)
124124

125125
Dim endConstructService = document.GetLanguageService(Of IEndConstructGenerationService)()
126-
Dim result = endConstructService.TryDo(textView, subjectBuffer, vbLf(0), CancellationToken.None)
126+
Dim result = endConstructService.TryDo(textView, subjectBuffer, vbLf(0), cancellationToken)
127127

128128
If Not result Then
129129
nextHandler()

0 commit comments

Comments
 (0)