Skip to content

Commit 3144cef

Browse files
committed
refactor(leap): tweak conditional expression
1 parent fe8c572 commit 3144cef

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

fnl/leap/main.fnl

+5-3
Original file line numberDiff line numberDiff line change
@@ -841,9 +841,11 @@ is either labeled (C) or not (B).
841841
(local in2* (. target :chars 2))
842842
(update-repeat-state {: in1 :in2 in2*})
843843
(do-action target)
844-
(if (or (= (length targets) 1) op-mode? (not directional?) user-given-action)
845-
(set-dot-repeat in1 in2* n)
846-
(traversal-loop targets n {:no-labels? true})) ; REDRAW (LOOP)
844+
(local can-traverse? (and (not op-mode?) (not user-given-action)
845+
directional? (> (length targets) 1)))
846+
(if can-traverse?
847+
(traversal-loop targets n {:no-labels? true}) ; REDRAW (LOOP)
848+
(set-dot-repeat in1 in2* n))
847849
(exit))
848850

849851
; Do this now - repeat can succeed, even if we fail this time.

lua/leap/main.lua

+4-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)