-
Notifications
You must be signed in to change notification settings - Fork 298
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Correct highlight of replaced variables/splats with braces #984
Correct highlight of replaced variables/splats with braces #984
Conversation
I think I figured out what the check for a The detection for a |
Prevent adjustment of userCompletionText while finding userCompletion text position when match contains `{` in CompletionText[1] if the userCompletionText is not longer than 1 char, and preserve the splat sigil at start of completions of type `Variable`. Adjusting userCompletionText blindly led to ArgumentOutOfRangeException on incorrectly braced splats on input `@?`.
6dee015
to
70d0d34
Compare
I've amended the commit for this PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
The correction for maintaining the sigil of the returned |
@daxian-dbw, you are right, I was so focused on the |
userCompletionText
inFindUserCompletionTextPosition
when the match contains{
in CompletionText[1] if theuserCompletionText
is not longer than 1 charVariable
.Adjusting
userCompletionText
blindly led toArgumentOutOfRangeException
on incorrectly braced splats on input@?
.Loss of the sigil of splats led to the splat sigil always being marked as replaced, and in situations where the PowerShell completion logic returned incorrect completions of splats with braces, led to a
ArgumentOutOfRangeException
.Fix #983.