-
-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
```js const value = [1, 2]; ``` 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 `value = [1, 2]`. I don't think this can be solved until we have a better `oneOf` implementation 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 - [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
- Loading branch information
1 parent
d6cc6f9
commit 8cf3464
Showing
5 changed files
with
73 additions
and
9 deletions.
There are no files selected for viewing
This file contains 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
33 changes: 33 additions & 0 deletions
33
data/fixtures/scopes/javascript.core/collectionItem.unenclosed.scope
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
let foo, bar; | ||
--- | ||
|
||
[#1 Content] = | ||
[#1 Domain] = 0:4-0:7 | ||
>---< | ||
0| let foo, bar; | ||
|
||
[#1 Removal] = 0:4-0:9 | ||
>-----< | ||
0| let foo, bar; | ||
|
||
[#1 Trailing delimiter] = 0:7-0:9 | ||
>--< | ||
0| let foo, bar; | ||
|
||
[#1 Insertion delimiter] = ", " | ||
|
||
|
||
[#2 Content] = | ||
[#2 Domain] = 0:9-0:12 | ||
>---< | ||
0| let foo, bar; | ||
|
||
[#2 Removal] = 0:7-0:12 | ||
>-----< | ||
0| let foo, bar; | ||
|
||
[#2 Leading delimiter] = 0:7-0:9 | ||
>--< | ||
0| let foo, bar; | ||
|
||
[#2 Insertion delimiter] = ", " |
This file contains 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
This file contains 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
This file contains 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