Skip to content

Commit 333a520

Browse files
Support grand grand scope (#2773)
Allows you to say grand multiple times. eg `"take grand grand state"` Fixes #2152 ## Checklist - [x] I have added [tests](https://www.cursorless.org/docs/contributing/test-case-recorder/) - [x] 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) - [x] I have not broken the cheatsheet
1 parent 7c8c675 commit 333a520

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/modifiers/simple_scope_modifier.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
@mod.capture(
2626
rule=(
27-
"[{user.cursorless_every_scope_modifier} | {user.cursorless_ancestor_scope_modifier}] "
27+
"[{user.cursorless_every_scope_modifier} | {user.cursorless_ancestor_scope_modifier}+] "
2828
"<user.cursorless_scope_type>"
2929
),
3030
)
@@ -40,7 +40,7 @@ def cursorless_simple_scope_modifier(m) -> dict[str, Any]:
4040
return {
4141
"type": "containingScope",
4242
"scopeType": m.cursorless_scope_type,
43-
"ancestorIndex": 1,
43+
"ancestorIndex": len(m.cursorless_ancestor_scope_modifier_list),
4444
}
4545

4646
if settings.get("user.private_cursorless_use_preferred_scope"):

0 commit comments

Comments
 (0)