-
-
Notifications
You must be signed in to change notification settings - Fork 85
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
Added scope type for "inside"
#2776
Merged
Merged
Changes from all commits
Commits
Show all changes
47 commits
Select commit
Hold shift + click to select a range
a669ea2
Create interior scope
AndreasArvidsson bacfe2a
More migrations
AndreasArvidsson 5026b89
Added test
AndreasArvidsson 57f50b1
Fixes
AndreasArvidsson c76b06c
Changed to main
AndreasArvidsson 261bf5c
Clean up
AndreasArvidsson fd17e7c
Use interior target
AndreasArvidsson df0c5ab
More testing
AndreasArvidsson 16895d9
Update query
AndreasArvidsson b573ebc
update tests
AndreasArvidsson f51daaf
Rename
AndreasArvidsson c8e3d08
Clean up
AndreasArvidsson f224844
Merge branch 'main' into interiorScope
AndreasArvidsson edb1686
Update test
AndreasArvidsson eb2e10c
Added tests
AndreasArvidsson 2fe2d06
Refactoring
AndreasArvidsson 1d28b12
Refactor
AndreasArvidsson bdea847
Simplification
AndreasArvidsson 3f95faf
Update test
AndreasArvidsson d558ac7
More fixes
AndreasArvidsson ac36859
Added comments
AndreasArvidsson 0fb7d86
Update comments
AndreasArvidsson b8565a7
More cleanup
AndreasArvidsson 7a9620f
More clean up
AndreasArvidsson 913f8e8
padding
AndreasArvidsson 40540dc
comment
AndreasArvidsson 3da4d51
Fix
AndreasArvidsson 9742579
Refactoring
AndreasArvidsson c107e8a
unused code
AndreasArvidsson 1f92e81
type import
AndreasArvidsson 2bf2496
Added textual interior scope test
AndreasArvidsson 93e46b0
Rename
AndreasArvidsson 827ebf1
Merge branch 'main' into interiorScope
AndreasArvidsson 65c9e11
Merge branch 'main' into interiorScope
AndreasArvidsson 7077448
Merge branch 'main' into interiorScope
phillco b9d1dad
Apply suggestions from code review
phillco eade3b5
Update packages/cursorless-engine/src/processTargets/modifiers/scopeH…
phillco 7d9d5fe
Merge branch 'main' into interiorScope
AndreasArvidsson 7ae7b30
Merge branch 'interiorScope' of github.com:cursorless-dev/cursorless …
AndreasArvidsson dc32fc8
Update comments
AndreasArvidsson 111b40c
cleanup
AndreasArvidsson 5c444eb
revert comments
AndreasArvidsson de5d624
Update packages/cursorless-engine/src/processTargets/modifiers/scopeH…
phillco bd096f8
Update packages/cursorless-engine/src/processTargets/modifiers/scopeH…
phillco 7f03ae6
Merge branch 'main' into interiorScope
phillco 39ab576
Merge branch 'main' into interiorScope
AndreasArvidsson 2678ffc
Merge fix
AndreasArvidsson File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
languageId: python | ||
command: | ||
version: 7 | ||
spokenForm: change inside | ||
action: | ||
name: clearAndSetSelection | ||
target: | ||
type: primitive | ||
modifiers: | ||
- {type: interiorOnly} | ||
usePrePhraseSnapshot: false | ||
initialState: | ||
documentContents: |- | ||
def testing(): | ||
pass | ||
selections: | ||
- anchor: {line: 0, character: 0} | ||
active: {line: 0, character: 0} | ||
marks: {} | ||
finalState: | ||
documentContents: |- | ||
def testing(): | ||
|
||
selections: | ||
- anchor: {line: 1, character: 4} | ||
active: {line: 1, character: 4} |
22 changes: 22 additions & 0 deletions
22
data/fixtures/recorded/modifiers/interior/changeInside.yml
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,22 @@ | ||
languageId: html | ||
command: | ||
version: 7 | ||
spokenForm: change inside | ||
action: | ||
name: clearAndSetSelection | ||
target: | ||
type: primitive | ||
modifiers: | ||
- {type: interiorOnly} | ||
usePrePhraseSnapshot: false | ||
initialState: | ||
documentContents: <div>content</div> | ||
selections: | ||
- anchor: {line: 0, character: 1} | ||
active: {line: 0, character: 1} | ||
marks: {} | ||
finalState: | ||
documentContents: <>content</div> | ||
selections: | ||
- anchor: {line: 0, character: 1} | ||
active: {line: 0, character: 1} |
22 changes: 22 additions & 0 deletions
22
data/fixtures/recorded/modifiers/interior/changeInside2.yml
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,22 @@ | ||
languageId: html | ||
command: | ||
version: 7 | ||
spokenForm: change inside | ||
action: | ||
name: clearAndSetSelection | ||
target: | ||
type: primitive | ||
modifiers: | ||
- {type: interiorOnly} | ||
usePrePhraseSnapshot: false | ||
initialState: | ||
documentContents: <div>content</div> | ||
selections: | ||
- anchor: {line: 0, character: 9} | ||
active: {line: 0, character: 9} | ||
marks: {} | ||
finalState: | ||
documentContents: <div></div> | ||
selections: | ||
- anchor: {line: 0, character: 5} | ||
active: {line: 0, character: 5} |
22 changes: 22 additions & 0 deletions
22
data/fixtures/recorded/modifiers/interior/changeInside3.yml
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,22 @@ | ||
languageId: plaintext | ||
command: | ||
version: 7 | ||
spokenForm: change inside | ||
action: | ||
name: clearAndSetSelection | ||
target: | ||
type: primitive | ||
modifiers: | ||
- {type: interiorOnly} | ||
usePrePhraseSnapshot: false | ||
initialState: | ||
documentContents: (hello) | ||
selections: | ||
- anchor: {line: 0, character: 3} | ||
active: {line: 0, character: 3} | ||
marks: {} | ||
finalState: | ||
documentContents: () | ||
selections: | ||
- anchor: {line: 0, character: 1} | ||
active: {line: 0, character: 1} |
22 changes: 22 additions & 0 deletions
22
data/fixtures/recorded/modifiers/interior/changeInside4.yml
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,22 @@ | ||
languageId: html | ||
command: | ||
version: 7 | ||
spokenForm: change inside | ||
action: | ||
name: clearAndSetSelection | ||
target: | ||
type: primitive | ||
modifiers: | ||
- {type: interiorOnly} | ||
usePrePhraseSnapshot: false | ||
initialState: | ||
documentContents: <div>content</div> (hello) | ||
selections: | ||
- anchor: {line: 0, character: 8} | ||
active: {line: 0, character: 23} | ||
marks: {} | ||
finalState: | ||
documentContents: <div>) | ||
selections: | ||
- anchor: {line: 0, character: 5} | ||
active: {line: 0, character: 5} |
24 changes: 24 additions & 0 deletions
24
data/fixtures/recorded/modifiers/interior/changeInsideElement.yml
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,24 @@ | ||
languageId: html | ||
command: | ||
version: 7 | ||
spokenForm: change inside element | ||
action: | ||
name: clearAndSetSelection | ||
target: | ||
type: primitive | ||
modifiers: | ||
- {type: interiorOnly} | ||
- type: containingScope | ||
scopeType: {type: xmlElement} | ||
usePrePhraseSnapshot: false | ||
initialState: | ||
documentContents: <div>content</div> | ||
selections: | ||
- anchor: {line: 0, character: 1} | ||
active: {line: 0, character: 1} | ||
marks: {} | ||
finalState: | ||
documentContents: <div></div> | ||
selections: | ||
- anchor: {line: 0, character: 5} | ||
active: {line: 0, character: 5} |
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 |
---|---|---|
@@ -1,14 +1,10 @@ | ||
<div id="root"></div> | ||
<div id="root">text</div> | ||
--- | ||
|
||
[Content] = | ||
[Removal] = | ||
[Domain] = 0:0-0:21 | ||
>---------------------< | ||
0| <div id="root"></div> | ||
|
||
[Interior] = 0:15-0:15 | ||
>< | ||
0| <div id="root"></div> | ||
[Domain] = 0:0-0:25 | ||
>-------------------------< | ||
0| <div id="root">text</div> | ||
|
||
[Insertion delimiter] = "\n" |
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,40 @@ | ||
<div> text </div> | ||
--- | ||
|
||
[#1 Content] = | ||
[#1 Removal] = 0:1-0:4 | ||
>---< | ||
0| <div> text </div> | ||
|
||
[#1 Domain] = 0:0-0:5 | ||
>-----< | ||
0| <div> text </div> | ||
|
||
[#1 Insertion delimiter] = " " | ||
|
||
|
||
[#2 Content] = 0:6-0:10 | ||
>----< | ||
0| <div> text </div> | ||
|
||
[#2 Removal] = 0:5-0:11 | ||
>------< | ||
0| <div> text </div> | ||
|
||
[#2 Domain] = 0:0-0:17 | ||
>-----------------< | ||
0| <div> text </div> | ||
|
||
[#2 Insertion delimiter] = " " | ||
|
||
|
||
[#3 Content] = | ||
[#3 Removal] = 0:13-0:16 | ||
>---< | ||
0| <div> text </div> | ||
|
||
[#3 Domain] = 0:11-0:17 | ||
>------< | ||
0| <div> text </div> | ||
|
||
[#3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,10 @@ | ||
<div id="root"></div> | ||
<div id="root">text</div> | ||
--- | ||
|
||
[Content] = | ||
[Removal] = | ||
[Domain] = 0:0-0:21 | ||
>---------------------< | ||
0| <div id="root"></div> | ||
|
||
[Interior] = 0:15-0:15 | ||
>< | ||
0| <div id="root"></div> | ||
[Domain] = 0:0-0:25 | ||
>-------------------------< | ||
0| <div id="root">text</div> | ||
|
||
[Insertion delimiter] = "\n" |
40 changes: 40 additions & 0 deletions
40
data/fixtures/scopes/javascript.jsx/interior.element.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,40 @@ | ||
<div> text </div> | ||
--- | ||
|
||
[#1 Content] = | ||
[#1 Removal] = 0:1-0:4 | ||
>---< | ||
0| <div> text </div> | ||
|
||
[#1 Domain] = 0:0-0:5 | ||
>-----< | ||
0| <div> text </div> | ||
|
||
[#1 Insertion delimiter] = " " | ||
|
||
|
||
[#2 Content] = 0:6-0:10 | ||
>----< | ||
0| <div> text </div> | ||
|
||
[#2 Removal] = 0:5-0:11 | ||
>------< | ||
0| <div> text </div> | ||
|
||
[#2 Domain] = 0:0-0:17 | ||
>-----------------< | ||
0| <div> text </div> | ||
|
||
[#2 Insertion delimiter] = " " | ||
|
||
|
||
[#3 Content] = | ||
[#3 Removal] = 0:13-0:16 | ||
>---< | ||
0| <div> text </div> | ||
|
||
[#3 Domain] = 0:11-0:17 | ||
>------< | ||
0| <div> text </div> | ||
|
||
[#3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
\begin{quote} | ||
Hello | ||
\end{quote} | ||
--- | ||
|
||
[#1 Content] = 1:4-1:9 | ||
>-----< | ||
1| Hello | ||
|
||
[#1 Removal] = 0:13-2:0 | ||
> | ||
0| \begin{quote} | ||
1| Hello | ||
2| \end{quote} | ||
< | ||
|
||
[#1 Domain] = 0:0-2:11 | ||
>------------- | ||
0| \begin{quote} | ||
1| Hello | ||
2| \end{quote} | ||
-----------< | ||
|
||
[#1 Insertion delimiter] = " " | ||
|
||
|
||
[#2 Content] = | ||
[#2 Removal] = 0:7-0:12 | ||
>-----< | ||
0| \begin{quote} | ||
|
||
[#2 Domain] = 0:6-0:13 | ||
>-------< | ||
0| \begin{quote} | ||
|
||
[#2 Insertion delimiter] = " " | ||
|
||
|
||
[#3 Content] = | ||
[#3 Removal] = 2:5-2:10 | ||
>-----< | ||
2| \end{quote} | ||
|
||
[#3 Domain] = 2:4-2:11 | ||
>-------< | ||
2| \end{quote} | ||
|
||
[#3 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
Oops, something went wrong.
Oops, something went wrong.
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.
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.
It would be neat if this would give you this:
<div>|</div> (|)