Skip to content

Commit 64f6033

Browse files
Fix bug with "every token inside"
1 parent 181cd9f commit 64f6033

File tree

2 files changed

+28
-1
lines changed

2 files changed

+28
-1
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
languageId: plaintext
2+
command:
3+
version: 7
4+
spokenForm: change every token inside
5+
action:
6+
name: clearAndSetSelection
7+
target:
8+
type: primitive
9+
modifiers:
10+
- type: everyScope
11+
scopeType: {type: token}
12+
- {type: interiorOnly}
13+
usePrePhraseSnapshot: false
14+
initialState:
15+
documentContents: "\"hello world\""
16+
selections:
17+
- anchor: {line: 0, character: 1}
18+
active: {line: 0, character: 1}
19+
marks: {}
20+
finalState:
21+
documentContents: "\" \""
22+
selections:
23+
- anchor: {line: 0, character: 1}
24+
active: {line: 0, character: 1}
25+
- anchor: {line: 0, character: 2}
26+
active: {line: 0, character: 2}

packages/cursorless-engine/src/processTargets/modifiers/EveryScopeStage.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ export class EveryScopeStage implements ModifierStage {
6161

6262
if (
6363
scopes.length === 1 &&
64-
scopes[0].domain.contains(target.contentRange)
64+
scopes[0].domain.contains(target.contentRange) &&
65+
!target.hasExplicitScopeType
6566
) {
6667
// If the only scope that came back completely contains the input target
6768
// range, we treat the input as if it had no explicit range, expanding

0 commit comments

Comments
 (0)