Repository navigation
End an indexed walk over the keybindings scan's stub collections - #16276
Merged
Merged
Conversation
#7564 made the stub answer every index so that `hl.get_monitors()[1].name` keeps reading, but that also means `while monitors[i] do i = i + 1 end` never finds a nil. The instruction limit stops it, and every bind declared after the loop is lost. Answer indexes 1 and 0 with the stub and every other number with nil: the first element and `list[#list]` (0, since the stub's length is 0) still read, a walk by index ends after a step, and `ipairs` still sees the collection as empty. The cache version moves to v19 so scans truncated by such a loop are redone. Co-Authored-By: Codex Medium <[email protected]> Co-Authored-By: muse-spark-1.3-contributor <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
Contributor
[Medium impact] The PR appears safe to merge. SummaryThe Lua keybindings scan now lets indexed walks finish while preserving first-element and last-element reads.
No actionable issues found. omarchybot explicitly accepts that reads through Reviews (1) · Last reviewed commit: "End an indexed walk over the keybindings..." · Reviewed by Greptile |
This was referenced Oct 22, 2026
omarchybot
added a commit
to seletz/omarchy
that referenced
this pull request
Oct 22, 2026
quattro moved the cache key to v19 with the Lua bind scan hardening (omacom#7564, omacom#16276), so this branch's v18 no longer invalidates a cache quattro wrote; v20 does. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This was referenced Oct 26, 2026
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#7564 made the keybindings menu's Lua bind scan survive configs that read compositor state at load time. To keep
hl.get_monitors()[1].namereading, its stub answers every index with another stub. That also means a walk by index,while monitors[i] do i = i + 1 end, never meets a nil. The scan's instruction limit stops it, so nothing hangs, but every bind declared after the loop is lost, and the menu falls back to the defaults those binds were meant to override, which is the wrong-app bug #7564 fixed.A stub cannot answer every idiom, so this keeps the common ones. Indexes 1 and 0 answer with the stub and every other number with nil.
list[1]reads.list[#list]reads too: the stub's length is 0, so that islist[0]. A walk by index from 0 or 1 ends after a step or two, andipairsstill sees the collection as empty, so loop bodies never run against stand-in values. The one read that still raises is an explicitlist[2]or beyond, which also raised under #7564's original approach of answering every number with nil.The cache version moves to
v19, so a scan already cut short by such a loop is redone.Related: #16128 fixes the same
ipairshang with the nil-for-every-number approach, againstquattrobefore #7564 landed.🤖 Generated by Opus 5.5 in Claude Code. Reviewed by Codex Medium and Muse Spark 1.3 Thinking High.