@@ -464,7 +464,6 @@ is either labeled (C) or not (B).
464
464
; Show beacons (labels & match highlights) ahead of time,
465
465
; right after the first input?
466
466
{:aot? (not (or (= max - phase - one - targets 0 )
467
- count
468
467
empty - label - lists ?
469
468
multi - select ?
470
469
user - given - targets ?))
@@ -656,7 +655,12 @@ is either labeled (C) or not (B).
656
655
in1 in1 ))
657
656
658
657
(fn get - second - pattern - input [targets ]
659
- (when (<= (length targets ) max - phase - one - targets )
658
+ (when (and (<= (length targets ) max - phase - one - targets )
659
+ ; Note: `count` does _not_ automatically disable
660
+ ; two-phase processing, as we might want to give
661
+ ; char<enter> partial input (but it implies not needing
662
+ ; to show beacons).
663
+ (not count ))
660
664
(with - highlight - chores (light - up - beacons targets )))
661
665
(get - input - by - keymap prompt ))
662
666
@@ -828,15 +832,18 @@ is either labeled (C) or not (B).
828
832
(when-not in2
829
833
(exit - early ))
830
834
831
- ; Jump eagerly to the very first match (without giving the full pattern)?
835
+ ; Jump eagerly to the count-th match (without giving the full pattern)?
832
836
(when (= in2 spec - keys.next_phase_one_target )
833
- (local first (. targets 1 ))
834
- (local in2 * (. first :chars 2 ))
837
+ (local n (or count 1 ))
838
+ (local target (. targets n ))
839
+ (when-not target
840
+ (exit - early ))
841
+ (local in2 * (. target :chars 2 ))
835
842
(update - repeat - state {: in1 :in2 in2 * })
836
- (do- action first )
843
+ (do- action target )
837
844
(if (or (= (length targets ) 1 ) op - mode ? (not directional ?) user - given - action )
838
- (set- dot - repeat in1 in2 * 1 )
839
- (traversal - loop targets 1 {:no-labels? true })) ; REDRAW (LOOP)
845
+ (set- dot - repeat in1 in2 * n )
846
+ (traversal - loop targets n {:no-labels? true })) ; REDRAW (LOOP)
840
847
(exit ))
841
848
842
849
; Do this now - repeat can succeed, even if we fail this time.
0 commit comments