File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
src/PowerShellEditorServices/Workspace Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -117,6 +117,7 @@ internal static ScriptFileMarker FromDiagnosticRecord(PSObject psObject)
117
117
{
118
118
var suggestedCorrections = diagnosticRecord . SuggestedCorrections as dynamic ;
119
119
List < ScriptRegion > editRegions = new List < ScriptRegion > ( ) ;
120
+ string correctionMessage = null ;
120
121
foreach ( var suggestedCorrection in suggestedCorrections )
121
122
{
122
123
editRegions . Add ( new ScriptRegion
@@ -128,11 +129,12 @@ internal static ScriptFileMarker FromDiagnosticRecord(PSObject psObject)
128
129
EndLineNumber = suggestedCorrection . EndLineNumber ,
129
130
EndColumnNumber = suggestedCorrection . EndColumnNumber
130
131
} ) ;
132
+ correctionMessage = suggestedCorrection . Description ;
131
133
}
132
134
133
135
correction = new MarkerCorrection
134
136
{
135
- Name = diagnosticRecord . Message ,
137
+ Name = correctionMessage == null ? diagnosticRecord . Message : correctionMessage ,
136
138
Edits = editRegions . ToArray ( )
137
139
} ;
138
140
}
You can’t perform that action at this time.
0 commit comments