-
-
Notifications
You must be signed in to change notification settings - Fork 91
Proper handling of surrounding pair delimiter prefixes #2705
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
Merged
Merged
Changes from 11 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
286260c
Proper handling of surrounding pair delimiter prefixes
AndreasArvidsson 1848a37
cleanup
AndreasArvidsson 111dd92
Update packages/cursorless-engine/src/processTargets/modifiers/scopeH…
AndreasArvidsson 0b2b158
Re add failing test
AndreasArvidsson 423cd0f
Merge branch 'main' into surroundingPairPythonDelimiters
AndreasArvidsson d861d83
Use parse tree
AndreasArvidsson af0205d
Update test
AndreasArvidsson 5d7bfd9
Merge branch 'main' into surroundingPairPythonDelimiters
AndreasArvidsson 85f92eb
Restore test
AndreasArvidsson 9a4b27d
Allow text fragments with error
AndreasArvidsson 2758c06
Update queries/python.scm
phillco 63121fc
Update queries/python.scm
phillco 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 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
22 changes: 22 additions & 0 deletions
22
data/fixtures/recorded/surroundingPair/parseTree/python/changeInside.yml
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
languageId: python | ||
command: | ||
version: 7 | ||
spokenForm: change inside | ||
action: | ||
name: clearAndSetSelection | ||
target: | ||
type: primitive | ||
modifiers: | ||
- {type: interiorOnly} | ||
usePrePhraseSnapshot: true | ||
initialState: | ||
documentContents: r'command server' | ||
selections: | ||
- anchor: {line: 0, character: 2} | ||
active: {line: 0, character: 2} | ||
marks: {} | ||
finalState: | ||
documentContents: r'' | ||
selections: | ||
- anchor: {line: 0, character: 2} | ||
active: {line: 0, character: 2} |
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
23 changes: 23 additions & 0 deletions
23
data/fixtures/recorded/surroundingPair/parseTree/python/changePair3.yml
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
languageId: python | ||
command: | ||
version: 7 | ||
spokenForm: change pair | ||
action: | ||
name: clearAndSetSelection | ||
target: | ||
type: primitive | ||
modifiers: | ||
- type: containingScope | ||
scopeType: {type: surroundingPair, delimiter: any} | ||
usePrePhraseSnapshot: true | ||
initialState: | ||
documentContents: r'command server' | ||
selections: | ||
- anchor: {line: 0, character: 2} | ||
active: {line: 0, character: 2} | ||
marks: {} | ||
finalState: | ||
documentContents: "" | ||
selections: | ||
- anchor: {line: 0, character: 0} | ||
active: {line: 0, character: 0} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
"server" | ||
'server' | ||
"""server""" | ||
'''server''' | ||
r" r" | ||
r' r' | ||
r""" r""" | ||
r''' r''' | ||
--- | ||
|
||
[#1 Content] = | ||
[#1 Domain] = 4:0-4:2 | ||
>--< | ||
4| r" r" | ||
|
||
[#1 Removal] = 4:0-4:3 | ||
>---< | ||
4| r" r" | ||
|
||
[#1 Trailing delimiter] = 4:2-4:3 | ||
>-< | ||
4| r" r" | ||
|
||
[#1 Insertion delimiter] = " " | ||
|
||
|
||
[#2 Content] = | ||
[#2 Domain] = 5:0-5:2 | ||
>--< | ||
5| r' r' | ||
|
||
[#2 Removal] = 5:0-5:3 | ||
>---< | ||
5| r' r' | ||
|
||
[#2 Trailing delimiter] = 5:2-5:3 | ||
>-< | ||
5| r' r' | ||
|
||
[#2 Insertion delimiter] = " " | ||
|
||
|
||
[#3 Content] = | ||
[#3 Domain] = 6:0-6:4 | ||
>----< | ||
6| r""" r""" | ||
|
||
[#3 Removal] = 6:0-6:5 | ||
>-----< | ||
6| r""" r""" | ||
|
||
[#3 Trailing delimiter] = 6:4-6:5 | ||
>-< | ||
6| r""" r""" | ||
|
||
[#3 Insertion delimiter] = " " | ||
|
||
|
||
[#4 Content] = | ||
[#4 Domain] = 7:0-7:4 | ||
>----< | ||
7| r''' r''' | ||
|
||
[#4 Removal] = 7:0-7:5 | ||
>-----< | ||
7| r''' r''' | ||
|
||
[#4 Trailing delimiter] = 7:4-7:5 | ||
>-< | ||
7| r''' r''' | ||
|
||
[#4 Insertion delimiter] = " " |
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
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
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
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
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
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
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
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
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
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
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
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.
Uh oh!
There was an error while loading. Please reload this page.