Skip to content

if_lua: runtime error with lua 5.5#19658

Closed
chrisbra wants to merge 1 commit intovim:masterfrom
chrisbra:gh-19639
Closed

if_lua: runtime error with lua 5.5#19658
chrisbra wants to merge 1 commit intovim:masterfrom
chrisbra:gh-19639

Conversation

@chrisbra
Copy link
Copy Markdown
Member

Problem: Lua 5.5 makes for-loop control variables read-only.
The path-parsing logic in if_lua.c attempts to modify the
loop variable 's', causing the script to fail during
runtime initialization (Binbin Qian)
Solution: Use a Lua capture group in gmatch() to extract the path
without the semicolon, avoiding the need to re-assign
to the loop variable.

fixes: #19639

supported by AI claude.

Problem:  Lua 5.5 makes for-loop control variables read-only.
          The path-parsing logic in if_lua.c attempts to modify the
          loop variable 's', causing the script to fail during
          runtime initialization (Binbin Qian)
Solution: Use a Lua capture group in gmatch() to extract the path
          without the semicolon, avoiding the need to re-assign
          to the loop variable.

fixes: vim#19639

supported by AI claude.

Signed-off-by: Christian Brabandt <cb@256bit.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Lua interface broken after Lua 5.5 upgrade

1 participant