Skip to content

Commit e69d649

Browse files
Change interior domain (#3099)
* Interior domain is now same as content range (before shrinking to text content). `"take inside"` with the cursor on a function name will not select function body anymore. * Interior of typed target now utilities every scope. `"take inside funk"` will select function body. `"take inside state"` will select all branch bodies in an if statement.
1 parent 034bd05 commit e69d649

File tree

135 files changed

+1105
-3816
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

135 files changed

+1105
-3816
lines changed

data/fixtures/recorded/languages/lua/changeInsideList.yml

Lines changed: 0 additions & 26 deletions
This file was deleted.

data/fixtures/recorded/modifiers/changeInsideValue.yml

Lines changed: 0 additions & 30 deletions
This file was deleted.

data/fixtures/recorded/modifiers/changeInside.yml renamed to data/fixtures/recorded/modifiers/interior/changeInside5.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ initialState:
1414
def testing():
1515
pass
1616
selections:
17-
- anchor: {line: 0, character: 0}
18-
active: {line: 0, character: 0}
17+
- anchor: {line: 1, character: 4}
18+
active: {line: 1, character: 4}
1919
marks: {}
2020
finalState:
2121
documentContents: |-
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
languageId: javascript
2+
command:
3+
version: 7
4+
spokenForm: change inside state
5+
action:
6+
name: clearAndSetSelection
7+
target:
8+
type: primitive
9+
modifiers:
10+
- {type: interiorOnly}
11+
- type: containingScope
12+
scopeType: {type: statement}
13+
usePrePhraseSnapshot: false
14+
initialState:
15+
documentContents: |-
16+
if (true) {
17+
a;
18+
}
19+
else if (false) {
20+
b;
21+
} else {
22+
c;
23+
}
24+
selections:
25+
- anchor: {line: 0, character: 0}
26+
active: {line: 0, character: 0}
27+
marks: {}
28+
finalState:
29+
documentContents: |-
30+
if (true) {
31+
32+
}
33+
else if (false) {
34+
35+
} else {
36+
37+
}
38+
selections:
39+
- anchor: {line: 1, character: 4}
40+
active: {line: 1, character: 4}
41+
- anchor: {line: 4, character: 4}
42+
active: {line: 4, character: 4}
43+
- anchor: {line: 6, character: 4}
44+
active: {line: 6, character: 4}

data/fixtures/recorded/selectionTypes/changeEveryPaintInsideParen2.yml renamed to data/fixtures/recorded/selectionTypes/changeEveryPaintInside.yml

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
languageId: plaintext
22
command:
33
version: 6
4-
spokenForm: change every paint inside paren
4+
spokenForm: change every paint inside
55
action:
66
name: clearAndSetSelection
77
target:
@@ -10,17 +10,12 @@ command:
1010
- type: everyScope
1111
scopeType: {type: nonWhitespaceSequence}
1212
- {type: interiorOnly}
13-
mark: {type: decoratedSymbol, symbolColor: default, character: (}
1413
usePrePhraseSnapshot: true
1514
initialState:
1615
documentContents: foo(aa|aa-().c_d bb|bb-().'') { return 1; }
1716
selections:
18-
- anchor: {line: 0, character: 0}
19-
active: {line: 0, character: 0}
20-
marks:
21-
default.(:
22-
start: {line: 0, character: 3}
23-
end: {line: 0, character: 4}
17+
- anchor: {line: 0, character: 4}
18+
active: {line: 0, character: 4}
2419
finalState:
2520
documentContents: " { return 1; }"
2621
selections:

data/fixtures/recorded/selectionTypes/changeEveryShortPaintInsideParen.yml renamed to data/fixtures/recorded/selectionTypes/changeEveryShortPaintInside.yml

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
languageId: plaintext
22
command:
33
version: 6
4-
spokenForm: change every short paint inside paren
4+
spokenForm: change every short paint inside
55
action:
66
name: clearAndSetSelection
77
target:
@@ -10,17 +10,12 @@ command:
1010
- type: everyScope
1111
scopeType: {type: boundedNonWhitespaceSequence}
1212
- {type: interiorOnly}
13-
mark: {type: decoratedSymbol, symbolColor: default, character: (}
1413
usePrePhraseSnapshot: true
1514
initialState:
1615
documentContents: foo(aa|aa-().c_d bb|bb-().'')
1716
selections:
18-
- anchor: {line: 0, character: 1}
19-
active: {line: 0, character: 1}
20-
marks:
21-
default.(:
22-
start: {line: 0, character: 3}
23-
end: {line: 0, character: 4}
17+
- anchor: {line: 0, character: 4}
18+
active: {line: 0, character: 4}
2419
finalState:
2520
documentContents: foo( )
2621
selections:

data/fixtures/recorded/selectionTypes/clearCore.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ command:
1212
initialState:
1313
documentContents: ( )
1414
selections:
15-
- anchor: {line: 0, character: 0}
16-
active: {line: 0, character: 0}
15+
- anchor: {line: 0, character: 1}
16+
active: {line: 0, character: 1}
1717
marks: {}
1818
finalState:
1919
documentContents: ()

data/fixtures/recorded/selectionTypes/clearCore2.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ command:
1212
initialState:
1313
documentContents: ()
1414
selections:
15-
- anchor: {line: 0, character: 0}
16-
active: {line: 0, character: 0}
15+
- anchor: {line: 0, character: 1}
16+
active: {line: 0, character: 1}
1717
marks: {}
1818
finalState:
1919
documentContents: ()

data/fixtures/recorded/surroundingPair/parseTree/python/clearMatching10.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ initialState:
1414
1515
"'jlkjl' 'fsd'"
1616
selections:
17-
- anchor: {line: 1, character: 8}
18-
active: {line: 1, character: 8}
17+
- anchor: {line: 1, character: 7}
18+
active: {line: 1, character: 7}
1919
marks: {}
2020
finalState:
2121
documentContents: |-
Lines changed: 4 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,10 @@
11
struct Foo { };
22
---
33

4-
[#1 Content] =
5-
[#1 Removal] = 0:12-0:13
4+
[Content] =
5+
[Removal] =
6+
[Domain] = 0:12-0:13
67
>-<
78
0| struct Foo { };
89

9-
[#1 Domain] = 0:0-0:15
10-
>---------------<
11-
0| struct Foo { };
12-
13-
[#1 Insertion delimiter] = " "
14-
15-
16-
[#2 Content] =
17-
[#2 Removal] = 0:12-0:13
18-
>-<
19-
0| struct Foo { };
20-
21-
[#2 Domain] = 0:11-0:14
22-
>---<
23-
0| struct Foo { };
24-
25-
[#2 Insertion delimiter] = " "
10+
[Insertion delimiter] = " "

0 commit comments

Comments
 (0)