From 1cdfd75bf173f0bb3644faa4cb24e9ee843917e3 Mon Sep 17 00:00:00 2001 From: Robert Holt Date: Fri, 17 Aug 2018 18:01:29 -0700 Subject: [PATCH] Fix comment-based help snippet (#726) --- .../Server/LanguageServer.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/PowerShellEditorServices.Protocol/Server/LanguageServer.cs b/src/PowerShellEditorServices.Protocol/Server/LanguageServer.cs index cfdebc527..b2257c3c2 100644 --- a/src/PowerShellEditorServices.Protocol/Server/LanguageServer.cs +++ b/src/PowerShellEditorServices.Protocol/Server/LanguageServer.cs @@ -1125,8 +1125,8 @@ protected async Task HandleCommentHelpRequest( helpLocation)); var help = analysisResults?.FirstOrDefault()?.Correction?.Edits[0].Text; - result.Content = help != null - ? (lines ?? ScriptFile.GetLines(funcText)).ToArray() + result.Content = help != null + ? (lines ?? ScriptFile.GetLines(help)).ToArray() : null; if (helpLocation != null &&