Merged
Conversation
pokey
approved these changes
Nov 16, 2024
Member
pokey
left a comment
There was a problem hiding this comment.
Seems good for now. I wonder if we have other examples we can use to test this?
Member
Author
Good question. Got anything in mind? |
Member
|
No, I couldn't come up with anything 🤷♂️ |
github-merge-queue bot
pushed a commit
that referenced
this pull request
Jan 14, 2025
```java
int[] values = {1, 2, 3};
```
This example is problematic. Currently we test the language specific implementation before the text based one. This means that if your cursor is inside the curly brackets `item` is `values = {1, 2, 3}`. I don't think this can be solved until we have a better `oneOf` implementation of collection item.
Same problem with JS #2675
## Checklist
- [x] I have added [tests](https://www.cursorless.org/docs/contributing/test-case-recorder/)
- [/] I have updated the [docs](https://github.com/cursorless-dev/cursorless/tree/main/docs) and [cheatsheet](https://github.com/cursorless-dev/cursorless/tree/main/cursorless-talon/src/cheatsheet)
- [/] I have not broken the cheatsheet
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This example is problematic. Currently we test the language specific implementation before the text based one. This means that if your cursor is inside the curly brackets
itemisvalue = [1, 2]. I don't think this can be solved until we have a betteroneOfimplementation of collection item.Same problem with Java #2674
To fix that above I made a change so that the text based item can be used even if there is a syntax tree one available if it's smaller. This needs to merge before the java pr.
Checklist