Skip to content

Commit

Permalink
Merge pull request #9337 from N-thony/fixed_display_comments
Browse files Browse the repository at this point in the history
Displaying multi-line comments better, from scripts
  • Loading branch information
Patowhiz authored Jan 11, 2025
2 parents d5ddca1 + 965b18f commit 918b8c9
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions instat/UserControl/ucrOutputPage.vb
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ Public Class ucrOutputPage
End If

'if no contents added just exit sub
If richTextBox.TextLength = 0 Then
If String.IsNullOrWhiteSpace(richTextBox.Text) Then
Exit Sub
End If

Expand All @@ -211,11 +211,10 @@ Public Class ucrOutputPage
If frmMain.clsInstatOptions.bIncludeCommentDefault Then
'show comments only
For Each line As clsRScriptElement In formattedRScript
If line.Type = RToken.TokenTypes.RComment Then
If line.Type = RToken.TokenTypes.RComment OrElse line.Type = RToken.TokenTypes.RNewLine Then
AddFormatedTextToRichTextBox(richTextBox, line.Text, OutputFont.GetFontForScriptType(line.Type), OutputFont.GetColourForScriptType(line.Type))
End If
Next

ElseIf frmMain.clsInstatOptions.bCommandsinOutput Then
'show command lines that are not comments
For Each line As clsRScriptElement In formattedRScript
Expand Down

0 comments on commit 918b8c9

Please sign in to comment.