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)
117117 {
118118 var suggestedCorrections = diagnosticRecord . SuggestedCorrections as dynamic ;
119119 List < ScriptRegion > editRegions = new List < ScriptRegion > ( ) ;
120+ string correctionMessage = null ;
120121 foreach ( var suggestedCorrection in suggestedCorrections )
121122 {
122123 editRegions . Add ( new ScriptRegion
@@ -128,11 +129,12 @@ internal static ScriptFileMarker FromDiagnosticRecord(PSObject psObject)
128129 EndLineNumber = suggestedCorrection . EndLineNumber ,
129130 EndColumnNumber = suggestedCorrection . EndColumnNumber
130131 } ) ;
132+ correctionMessage = suggestedCorrection . Description ;
131133 }
132134
133135 correction = new MarkerCorrection
134136 {
135- Name = diagnosticRecord . Message ,
137+ Name = correctionMessage == null ? diagnosticRecord . Message : correctionMessage ,
136138 Edits = editRegions . ToArray ( )
137139 } ;
138140 }
You can’t perform that action at this time.
0 commit comments