Skip to content

Commit 9e357ca

Browse files
authored
respect line limit in quick info (#16208)
1 parent 52d98fe commit 9e357ca

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

vsintegration/src/FSharp.Editor/DocComments/XMLDocumentation.fs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,12 @@ type internal TextSanitizingCollector(collector, ?lineLimit: int) =
7878

7979
interface ITaggedTextCollector with
8080
member _.Add taggedText =
81-
// TODO: bail out early if line limit is already hit
82-
match taggedText.Tag with
83-
| TextTag.Text -> reportTextLines taggedText.Text
84-
| _ -> addTaggedTextEntry taggedText
81+
match lineLimit with
82+
| Some lineLimit when lineLimit < count -> ()
83+
| _ ->
84+
match taggedText.Tag with
85+
| TextTag.Text -> reportTextLines taggedText.Text
86+
| _ -> addTaggedTextEntry taggedText
8587

8688
member _.IsEmpty = isEmpty
8789
member _.EndsWithLineBreak = isEmpty || endsWithLineBreak

0 commit comments

Comments
 (0)