@@ -199,6 +199,11 @@ type internal FSharpAsyncQuickInfoSource
199199let! symbolUse , sigQuickInfo , targetQuickInfo = FSharpQuickInfo.getQuickInfo( checkerProvider.Checker, projectInfoManager, document, triggerPoint.Position, cancellationToken)
200200let getTrackingSpan ( span : TextSpan ) =
201201 textBuffer.CurrentSnapshot.CreateTrackingSpan( span.Start, span.Length, SpanTrackingMode.EdgeInclusive)
202+ let lineBreak = TaggedTextOps.Literals.lineBreak
203+ let joinWithLineBreaks segments =
204+ match segments|> List.filter( Seq.isEmpty>> not ) with
205+ | [] -> Seq.empty
206+ | xs-> xs|> List.reduce( fun acc elem -> seq { yield ! acc; yield lineBreak; yield ! elem})
202207
203208match sigQuickInfo, targetQuickInfowith
204209| None, None-> return null
@@ -208,32 +213,15 @@ type internal FSharpAsyncQuickInfoSource
208213 XmlDocumentation.BuildDataTipText( documentationBuilder, mainDescription.Add, documentation.Add, typeParameterMap.Add, usage.Add, exceptions.Add, quickInfo.StructuredText)
209214let imageId = Tokenizer.GetImageIdForSymbol( quickInfo.Symbol, quickInfo.SymbolKind)
210215let navigation = QuickInfoNavigation( gotoDefinitionService, document, symbolUse.RangeAlternate)
211- let content = QuickInfoViewProvider.provideContent( imageId, mainDescription, documentation, typeParameterMap, usage, exceptions, navigation)
216+ let docs = joinWithLineBreaks[ documentation; typeParameterMap; usage; exceptions]
217+ let content = QuickInfoViewProvider.provideContent( imageId, mainDescription, docs, navigation)
212218let span = getTrackingSpan quickInfo.Span
213219return QuickInfoItem( span, content)
214220
215221| Some sigQuickInfo, Some targetQuickInfo->
216222let mainDescription , targetDocumentation , sigDocumentation , typeParameterMap , exceptions , usage = ResizeArray(), ResizeArray(), ResizeArray(), ResizeArray(), ResizeArray(), ResizeArray()
217223 XmlDocumentation.BuildDataTipText( documentationBuilder, ignore, sigDocumentation.Add, ignore, ignore, ignore, sigQuickInfo.StructuredText)
218224 XmlDocumentation.BuildDataTipText( documentationBuilder, mainDescription.Add, targetDocumentation.Add, typeParameterMap.Add, exceptions.Add, usage.Add, targetQuickInfo.StructuredText)
219-
220- let width =
221- mainDescription
222- |> Seq.append targetDocumentation
223- |> Seq.append exceptions
224- |> Seq.append usage
225- |> Seq.append sigDocumentation
226- |> Seq.append typeParameterMap
227- |> Seq.map( fun x -> x.Text.Length)
228- |> Seq.max
229-
230- // eyeballed formula returning separator width in chars such as to prevent it from wrapping
231- // will not be needed once we replace the ascii-art divider with a XAML element
232- let width = if width/ 2 > 85 then 85 else width/ 2
233-
234- let seperator = TaggedTextOps.tag Text( String.replicate width" ⎯" )
235- let lineBreak = TaggedTextOps.tag LineBreak" \n "
236-
237225// get whitespace nomalized documentation text
238226let getText ( tts : seq < Layout.TaggedText >) =
239227let text =
@@ -251,15 +239,12 @@ type internal FSharpAsyncQuickInfoSource
251239| Some implText, Some sigTextwhen implText.Equals( sigText, StringComparison.OrdinalIgnoreCase) ->
252240yield ! sigDocumentation
253241| Some_ , Some_ ->
254- yield ! sigDocumentation
255- yield lineBreak
256- yield seperator
257- yield lineBreak
258- yield ! targetDocumentation]
259- |> ResizeArray
242+ yield ! joinWithLineBreaks[ sigDocumentation; [ TaggedTextOps.tagText" -------------" ]; targetDocumentation]
243+ ] |> ResizeArray
244+ let docs = joinWithLineBreaks[ documentation; typeParameterMap; usage; exceptions]
260245let imageId = Tokenizer.GetImageIdForSymbol( targetQuickInfo.Symbol, targetQuickInfo.SymbolKind)
261246let navigation = QuickInfoNavigation( gotoDefinitionService, document, symbolUse.RangeAlternate)
262- let content = QuickInfoViewProvider.provideContent( imageId, mainDescription, documentation , typeParameterMap , usage , exceptions , navigation)
247+ let content = QuickInfoViewProvider.provideContent( imageId, mainDescription, docs , navigation)
263248let span = getTrackingSpan targetQuickInfo.Span
264249return QuickInfoItem( span, content)
265250} |> Async.map Option.toObj