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)
2626def 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 {
@@ -47,7 +47,7 @@ def cursorless_ordinal_range(m) -> dict[str, Any]:
4747 rule = (
4848 "[{user.cursorless_every_scope_modifier}] "
4949 "({user.cursorless_first_modifier} | {user.cursorless_last_modifier}) "
50- "<user.private_cursorless_number_small > <user.cursorless_scope_type_plural>"
50+ "<number_small > <user.cursorless_scope_type_plural>"
5151 ),
5252)
5353def cursorless_first_last (m ) -> dict [str , Any ]:
@@ -57,13 +57,13 @@ def cursorless_first_last(m) -> dict[str, Any]:
5757 return create_ordinal_scope_modifier (
5858 m .cursorless_scope_type_plural ,
5959 0 ,
60- m .private_cursorless_number_small ,
60+ m .number_small ,
6161 is_every ,
6262 )
6363 return create_ordinal_scope_modifier (
6464 m .cursorless_scope_type_plural ,
65- - m .private_cursorless_number_small ,
66- m .private_cursorless_number_small ,
65+ - m .number_small ,
66+ m .number_small ,
6767 is_every ,
6868 )
6969
0 commit comments