Skip to content

Commit 1e996d2

Browse files
Added Cursorless prefects to ordinal_or_last capture (#2691)
This capture was missing our Cursorless prefix ## 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 8cd7c21 commit 1e996d2

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

cursorless-talon/src/modifiers/ordinal_scope.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,24 +13,24 @@
1313
@mod.capture(
1414
rule="<user.ordinals_small> | [<user.ordinals_small>] {user.cursorless_last_modifier}"
1515
)
16-
def ordinal_or_last(m) -> int:
16+
def cursorless_ordinal_or_last(m) -> int:
1717
"""An ordinal or the word 'last'"""
1818
if m[-1] == "last":
1919
return -getattr(m, "ordinals_small", 1)
2020
return m.ordinals_small - 1
2121

2222

2323
@mod.capture(
24-
rule="<user.ordinal_or_last> [<user.cursorless_range_connective> <user.ordinal_or_last>] <user.cursorless_scope_type>"
24+
rule="<user.cursorless_ordinal_or_last> [<user.cursorless_range_connective> <user.cursorless_ordinal_or_last>] <user.cursorless_scope_type>"
2525
)
2626
def cursorless_ordinal_range(m) -> dict[str, Any]:
2727
"""Ordinal range"""
2828
anchor = create_ordinal_scope_modifier(
29-
m.cursorless_scope_type, m.ordinal_or_last_list[0]
29+
m.cursorless_scope_type, m.cursorless_ordinal_or_last_list[0]
3030
)
31-
if len(m.ordinal_or_last_list) > 1:
31+
if len(m.cursorless_ordinal_or_last_list) > 1:
3232
active = create_ordinal_scope_modifier(
33-
m.cursorless_scope_type, m.ordinal_or_last_list[1]
33+
m.cursorless_scope_type, m.cursorless_ordinal_or_last_list[1]
3434
)
3535
range_connective: RangeConnective = m.cursorless_range_connective
3636
return {

0 commit comments

Comments
 (0)