Skip to content

Commit a06fafe

Browse files
author
Kapil Borle
committed
Fix help completion at the beginning of a function
1 parent 77eab6d commit a06fafe

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/PowerShellEditorServices.Protocol/Server/LanguageServer.cs

+6
Original file line numberDiff line numberDiff line change
@@ -1109,6 +1109,12 @@ protected async Task HandleCommentHelpRequest(
11091109
.Split('\n')
11101110
.Select(x => x.Trim('\r'))
11111111
.ToArray();
1112+
1113+
if (helpLocation.Equals("begin", StringComparison.OrdinalIgnoreCase))
1114+
{
1115+
// we need to trim the leading `{` that the correction sends.
1116+
result.Content = result.Content?.Skip(1).ToArray();
1117+
}
11121118
}
11131119

11141120
await requestContext.SendResult(result);

0 commit comments

Comments
 (0)