syntax (completion-context): fix an infinite loop with three or more nested brace contexts#699
Conversation
There was a problem hiding this comment.
Pull request overview
Fixes an infinite loop in completion-context handling when walking outward through three or more nested brace-expansion contexts.
Changes:
- Converts nested brace parent links from stored relative
nlenvalues to absolute indices while walking outward. - Aligns brace completion-context traversal with existing nest-pop semantics.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
The test failures seem unrelated to this PR. |
|
The CI issue turned out to be caused by the change of the |
|
Thank you for the fix! I've merged the PR. |
nest[3]storesnlen(the length to the parent nest), not the parent's absolute index. Following the same pattern asnest-pop, convert it viainest1-nest[3]. Without this, every_ble_syntax_nest[k]fork>=1inside{{{...}hasnlen=1, and the walk-outward loop becomes a fixed point atinest1=1.Fixes #698.