提交 760f9da8 编写于 作者: R Ravi Chande

Add a comment

上级 a063b60f
...@@ -1515,9 +1515,22 @@ $$]]></Document>, extraExportedTypes:={GetType(CSharpEditorFormattingService)}.T ...@@ -1515,9 +1515,22 @@ $$]]></Document>, extraExportedTypes:={GetType(CSharpEditorFormattingService)}.T
End Using End Using
End Sub End Sub
<WorkItem(588, "https://github.com/dotnet/roslyn/issues/588")> <WorkItem(4978, "https://github.com/dotnet/roslyn/issues/4978")>
<Fact, Trait(Traits.Feature, Traits.Features.Completion)> <Fact, Trait(Traits.Feature, Traits.Features.Completion)>
Public Sub DiffView() Public Sub SessionNotStartedWhenCaretNotMappableIntoSubjectBuffer()
' In inline diff view, typing delete next to a "deletion",
' can cause our CommandChain to be called with a subjectbuffer
' and TextView such that the textView's caret can't be mapped
' into our subject buffer.
'
' To test this, we create a projection buffer with 2 source
' spans: one of "text" content type and one based on a C#
' buffer. We create a TextView with that projection as
' its buffer, setting the caret such that it maps only
' into the "text" buffer. We then call the completion
' command handlers with commandargs based on that TextView
' but with the C# buffer as the SubjectBuffer.
Using state = TestState.CreateCSharpTestState( Using state = TestState.CreateCSharpTestState(
<Document><![CDATA[ <Document><![CDATA[
class C class C
...@@ -1529,7 +1542,6 @@ class C ...@@ -1529,7 +1542,6 @@ class C
} }
}]]></Document>, extraExportedTypes:={GetType(CSharpEditorFormattingService)}.ToList()) }]]></Document>, extraExportedTypes:={GetType(CSharpEditorFormattingService)}.ToList())
Dim differenceBufferService = state.GetExportedValue(Of IDifferenceBufferFactoryService)
Dim textBufferFactoryService = state.GetExportedValue(Of ITextBufferFactoryService)() Dim textBufferFactoryService = state.GetExportedValue(Of ITextBufferFactoryService)()
Dim contentTypeService = state.GetExportedValue(Of IContentTypeRegistryService)() Dim contentTypeService = state.GetExportedValue(Of IContentTypeRegistryService)()
Dim contentType = contentTypeService.GetContentType(ContentTypeNames.CSharpContentType) Dim contentType = contentTypeService.GetContentType(ContentTypeNames.CSharpContentType)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册