Skip to content

Commit 4b1e0ce

Browse files
Make range explicit for stored targets (#1529)
Fixes #1418 ## Checklist - [ ] 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
1 parent 2c220ec commit 4b1e0ce

File tree

84 files changed

+264
-264
lines changed

Some content is hidden

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

84 files changed

+264
-264
lines changed

packages/cursorless-engine/src/core/commandRunner/selectionToStoredTarget.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@ export const selectionToStoredTarget = (selection: SelectionWithEditor) =>
1414
editor: selection.editor,
1515
isReversed: selection.selection.isReversed,
1616
contentRange: selection.selection,
17-
hasExplicitRange: !selection.selection.isEmpty,
17+
hasExplicitRange: true,
1818
});

packages/cursorless-vscode-e2e/src/suite/fixtures/recorded/actions/cloneArgue.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ finalState:
4646
hasExplicitRange: true
4747
ide:
4848
flashes:
49-
- range:
49+
- style: justAdded
50+
range:
5051
type: character
5152
start: {line: 0, character: 26}
5253
end: {line: 0, character: 37}
53-
style: justAdded
5454
fullTargets: [{type: primitive, mark: {type: cursor}, modifiers: [{type: containingScope, scopeType: {type: argumentOrParameter}}]}]

packages/cursorless-vscode-e2e/src/suite/fixtures/recorded/actions/cloneToken.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ finalState:
3636
hasExplicitRange: true
3737
ide:
3838
flashes:
39-
- range:
39+
- style: justAdded
40+
range:
4041
type: character
4142
start: {line: 0, character: 12}
4243
end: {line: 0, character: 17}
43-
style: justAdded
4444
fullTargets: [{type: primitive, mark: {type: cursor}, modifiers: [{type: containingScope, scopeType: {type: token}}]}]

packages/cursorless-vscode-e2e/src/suite/fixtures/recorded/actions/cloneToken2.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ finalState:
3636
hasExplicitRange: true
3737
ide:
3838
flashes:
39-
- range:
39+
- style: justAdded
40+
range:
4041
type: character
4142
start: {line: 0, character: 6}
4243
end: {line: 0, character: 11}
43-
style: justAdded
4444
fullTargets: [{type: primitive, mark: {type: cursor}, modifiers: [{type: containingScope, scopeType: {type: token}}]}]

packages/cursorless-vscode-e2e/src/suite/fixtures/recorded/actions/cloneUpArgue.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ finalState:
4646
hasExplicitRange: true
4747
ide:
4848
flashes:
49-
- range:
49+
- style: justAdded
50+
range:
5051
type: character
5152
start: {line: 0, character: 13}
5253
end: {line: 0, character: 24}
53-
style: justAdded
5454
fullTargets: [{type: primitive, mark: {type: cursor}, modifiers: [{type: containingScope, scopeType: {type: argumentOrParameter}}]}]

packages/cursorless-vscode-e2e/src/suite/fixtures/recorded/actions/cloneUpToken.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ finalState:
3636
hasExplicitRange: true
3737
ide:
3838
flashes:
39-
- range:
39+
- style: justAdded
40+
range:
4041
type: character
4142
start: {line: 0, character: 6}
4243
end: {line: 0, character: 11}
43-
style: justAdded
4444
fullTargets: [{type: primitive, mark: {type: cursor}, modifiers: [{type: containingScope, scopeType: {type: token}}]}]

packages/cursorless-vscode-e2e/src/suite/fixtures/recorded/actions/cloneUpToken2.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ finalState:
3636
hasExplicitRange: true
3737
ide:
3838
flashes:
39-
- range:
39+
- style: justAdded
40+
range:
4041
type: character
4142
start: {line: 0, character: 0}
4243
end: {line: 0, character: 5}
43-
style: justAdded
4444
fullTargets: [{type: primitive, mark: {type: cursor}, modifiers: [{type: containingScope, scopeType: {type: token}}]}]

packages/cursorless-vscode-e2e/src/suite/fixtures/recorded/actions/drinkThis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,5 @@ finalState:
3030
start: {line: 1, character: 2}
3131
end: {line: 1, character: 2}
3232
isReversed: false
33-
hasExplicitRange: false
33+
hasExplicitRange: true
3434
fullTargets: [{type: primitive, mark: {type: cursor}, modifiers: []}]

packages/cursorless-vscode-e2e/src/suite/fixtures/recorded/actions/insertEmptyLines/dropThis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ finalState:
2525
start: {line: 1, character: 0}
2626
end: {line: 1, character: 0}
2727
isReversed: false
28-
hasExplicitRange: false
28+
hasExplicitRange: true
2929
ide:
3030
flashes:
31-
- range: {type: line, start: 0, end: 0}
32-
style: justAdded
31+
- style: justAdded
32+
range: {type: line, start: 0, end: 0}
3333
fullTargets: [{type: primitive, mark: {type: cursor}, modifiers: []}]

packages/cursorless-vscode-e2e/src/suite/fixtures/recorded/actions/insertEmptyLines/dropThis10.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ finalState:
2929
start: {line: 2, character: 0}
3030
end: {line: 2, character: 0}
3131
isReversed: false
32-
hasExplicitRange: false
32+
hasExplicitRange: true
3333
ide:
3434
flashes:
35-
- range: {type: line, start: 1, end: 1}
36-
style: justAdded
35+
- style: justAdded
36+
range: {type: line, start: 1, end: 1}
3737
fullTargets: [{type: primitive, mark: {type: cursor}, modifiers: []}]

0 commit comments

Comments
 (0)