Skip to content

Commit

Permalink
Merge pull request #127 from SpecFlowOSS/fix-folding
Browse files Browse the repository at this point in the history
fix folding when adding tags before a Background #125
  • Loading branch information
nemesv authored Jun 8, 2021
2 parents b6aaaad + 5dcea4f commit 1e107fa
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,12 @@ private static void FoldNode(ITreeNode node, FoldingHighlightingConsumer consume

private static int CalculateLength(DocumentRange? textRange, DocumentRange keywordRange, DocumentRange range)
{
if (!keywordRange.IsValid() || !range.IsValid())
return 0;

if (textRange.HasValue && !textRange.Value.IsValid())
return 0;

if (keywordRange == range)
return 0;

Expand Down

0 comments on commit 1e107fa

Please sign in to comment.