Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions data/fixtures/recorded/everyScope/changeEveryTokenInside.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
languageId: plaintext
command:
version: 7
spokenForm: change every token inside
action:
name: clearAndSetSelection
target:
type: primitive
modifiers:
- type: everyScope
scopeType: {type: token}
- {type: interiorOnly}
usePrePhraseSnapshot: false
initialState:
documentContents: "'hello world'"
selections:
- anchor: {line: 0, character: 1}
active: {line: 0, character: 1}
marks: {}
finalState:
documentContents: "' '"
selections:
- anchor: {line: 0, character: 1}
active: {line: 0, character: 1}
- anchor: {line: 0, character: 2}
active: {line: 0, character: 2}
26 changes: 26 additions & 0 deletions data/fixtures/recorded/everyScope/changeLastTokenInside.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
languageId: plaintext
command:
version: 7
spokenForm: change last token inside
action:
name: clearAndSetSelection
target:
type: primitive
modifiers:
- type: ordinalScope
scopeType: {type: token}
start: -1
length: 1
- {type: interiorOnly}
usePrePhraseSnapshot: false
initialState:
documentContents: "'hello world'"
selections:
- anchor: {line: 0, character: 1}
active: {line: 0, character: 1}
marks: {}
finalState:
documentContents: "'hello '"
selections:
- anchor: {line: 0, character: 7}
active: {line: 0, character: 7}
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ export class EveryScopeStage implements ModifierStage {

if (
scopes.length === 1 &&
scopes[0].domain.contains(target.contentRange)
scopes[0].domain.contains(target.contentRange) &&
!target.hasExplicitScopeType
Copy link
Member

@phillco phillco Jan 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hats + this are implicit, others are explicit

* particular scope type when `hasExplicitScopeType` is `false`:

) {
// If the only scope that came back completely contains the input target
// range, we treat the input as if it had no explicit range, expanding
Expand Down
Loading