Skip to content

Commit 7c03fb7

Browse files
authored
Add support for testing our Talon api; test "phones" and "format" (#1728)
- Fixes #1721 ## 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 3c9f3f6 commit 7c03fb7

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

src/actions/get_text.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,18 @@ def cursorless_get_text_action(
1111
ensure_single_target: Optional[bool] = None,
1212
) -> list[str]:
1313
"""Get target texts"""
14+
options = {}
15+
16+
if show_decorations is not None:
17+
options["showDecorations"] = show_decorations
18+
19+
if ensure_single_target is not None:
20+
options["ensureSingleTarget"] = ensure_single_target
21+
1422
return actions.user.private_cursorless_command_get(
1523
{
1624
"name": "getText",
17-
"options": {
18-
"showDecorations": show_decorations,
19-
"ensureSingleTarget": ensure_single_target,
20-
},
25+
"options": options,
2126
"target": target,
2227
}
2328
)

0 commit comments

Comments
 (0)