mirror of
https://github.com/cursorless-dev/cursorless.git
synced 2024-10-04 04:47:29 +03:00
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
This commit is contained in:
parent
36020662ef
commit
8829946a8b
@ -91,6 +91,9 @@ def get_modifier_callback(modifier: dict) -> Callable:
|
||||
case "containingScope":
|
||||
scope_type_type = modifier["scopeType"]["type"]
|
||||
return get_simple_modifier_callback(f"{modifier_type}.{scope_type_type}")
|
||||
case "preferredScope":
|
||||
scope_type_type = modifier["scopeType"]["type"]
|
||||
return get_simple_modifier_callback(f"containingScope.{scope_type_type}")
|
||||
case "extendThroughStartOf":
|
||||
if "modifiers" not in modifier:
|
||||
return get_simple_modifier_callback(f"{modifier_type}.line")
|
||||
|
Loading…
Reference in New Issue
Block a user