diff options
| author | Jackson Moore <jacksonmoore@tuta.io> | 2026-09-04 10:26:22 +0200 |
|---|---|---|
| committer | Jackson Moore <jacksonmoore@tuta.io> | 2026-09-04 10:26:22 +0200 |
| commit | a9ece4278ad0feb098db9027be1419121d61aca9 (patch) | |
| tree | ff88f952d2a3d8a96d286eae49d6a5e9c4d87c3a /lua/clever_f | |
| parent | ab20c92fb4025d447b41de5529c2380a668f4958 (diff) | |
Reject repeated stationary TILL destinations
Diffstat (limited to 'lua/clever_f')
| -rw-r--r-- | lua/clever_f/destination_engine.lua | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lua/clever_f/destination_engine.lua b/lua/clever_f/destination_engine.lua index e3a7fc1..53b26fe 100644 --- a/lua/clever_f/destination_engine.lua +++ b/lua/clever_f/destination_engine.lua @@ -143,12 +143,16 @@ local function next_destination(request, origin, allow_till_equality) end end +local function till_equality_allowed(request, successful_steps) + return request.first_move and successful_steps == 0 +end + function DestinationEngine:calculate(view, origin, plan, count, first_move) local request = calculation_inputs(view, origin, plan, count, first_move) local destination = next_destination( request, request.origin, - request.first_move + till_equality_allowed(request, 0) ) if destination == nil then return domain.SearchOutcome.boundary_before_any(request.origin) |
