@@ -424,7 +424,7 @@ void FunctionListSelectedItemChange(string selectedItemText, Rect selectedItemBo
424424 try
425425 {
426426 _descriptionToolTip ? . ShowToolTip (
427- text : new FormattedText { GetFunctionDescriptionOrNull ( functionInfo ) } ,
427+ text : new FormattedText { descriptionLines } ,
428428 linePrefix : null ,
429429 left : ( int ) listBounds . Right + DescriptionLeftMargin ,
430430 top : ( int ) selectedItemBounds . Bottom - 18 ,
@@ -531,9 +531,8 @@ FormattedText GetFunctionIntelliSense(FunctionInfo functionInfo, int currentArgI
531531 var formattedText = new FormattedText { nameLine , descriptionLines } ;
532532 if ( argumentList . Count > currentArgIndex )
533533 {
534- var description = GetArgumentDescriptionOrNull ( argumentList [ currentArgIndex ] ) ;
535- if ( description != null )
536- formattedText . Add ( description ) ;
534+ var description = GetArgumentDescription ( argumentList [ currentArgIndex ] ) ;
535+ formattedText . Add ( description ) ;
537536 }
538537
539538 return formattedText ;
@@ -583,12 +582,13 @@ FormattedText GetFunctionIntelliSense(FunctionInfo functionInfo, int currentArgI
583582 }
584583 }
585584
586- TextLine GetArgumentDescriptionOrNull ( FunctionInfo . ArgumentInfo argumentInfo )
585+ IEnumerable < TextLine > GetArgumentDescription ( FunctionInfo . ArgumentInfo argumentInfo )
587586 {
588587 if ( string . IsNullOrEmpty ( argumentInfo . Description ) )
589- return null ;
588+ yield break ;
590589
591- return new TextLine {
590+ var lines = argumentInfo . Description . Split ( s_newLineStringArray , StringSplitOptions . None ) ;
591+ yield return new TextLine {
592592 new TextRun
593593 {
594594 Style = System . Drawing . FontStyle . Bold | System . Drawing . FontStyle . Italic ,
@@ -597,9 +597,19 @@ TextLine GetArgumentDescriptionOrNull(FunctionInfo.ArgumentInfo argumentInfo)
597597 new TextRun
598598 {
599599 Style = System . Drawing . FontStyle . Italic ,
600- Text = argumentInfo . Description ?? ""
600+ Text = lines . FirstOrDefault ( ) ?? ""
601601 } ,
602602 } ;
603+
604+ foreach ( var line in lines . Skip ( 1 ) )
605+ {
606+ yield return new TextLine {
607+ new TextRun
608+ {
609+ Style = System . Drawing . FontStyle . Italic ,
610+ Text = line
611+ } } ;
612+ }
603613 }
604614
605615 public void Dispose ( )
0 commit comments