Skip to content

Commit 8829946

Browse files
Added fallback for preferred scope (#2648)
## 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 3602066 commit 8829946

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

cursorless-talon/src/fallback.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,9 @@ def get_modifier_callback(modifier: dict) -> Callable:
9191
case "containingScope":
9292
scope_type_type = modifier["scopeType"]["type"]
9393
return get_simple_modifier_callback(f"{modifier_type}.{scope_type_type}")
94+
case "preferredScope":
95+
scope_type_type = modifier["scopeType"]["type"]
96+
return get_simple_modifier_callback(f"containingScope.{scope_type_type}")
9497
case "extendThroughStartOf":
9598
if "modifiers" not in modifier:
9699
return get_simple_modifier_callback(f"{modifier_type}.line")

0 commit comments

Comments
 (0)