Add newlines to histogram queries #2822
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The issue in #2819 looks to be a revisit of what we first saw in #2452. Like that issue, it seems the fix is as simple as adding a newline after the user's base query so that way the additional Zed that app tacks on will still be active even if the user's program ended with a comment.
Regarding coding style, I wasn't sure if indents were necessary to make it obvious that these string literals spanned multiple lines. However, the prior fix in #2519 didn't have indents and what I've got in this branch seems to pass the linter.
I've put down @nwt as an additional reviewer just to double check that there's no negative side effects we can think of from these newlines being added.
Here's the video evidence on this branch of the fix working for the three variations laid out in #2819
Verify.mp4
Note that I've not tried to dig into the "TypeError: Cannot add property 2000, object is not extensible" error I showed in #2819 since that's a bit beyond my expertise. As I expected, my fixes here seem to prevent that error from being triggered anymore, but maybe there's still something to look closer at there.
Fixes #2819