fix(lua): search.lua autoload failed after lua 5.5 (#1503)

Removed unnecessary increment of 'i' in the loop.
This commit is contained in:
chenxu
2026-03-16 12:24:32 +08:00
committed by GitHub
parent 4fe519c81e
commit 18cb213d9f

View File

@@ -21,7 +21,6 @@ local function get_pos( text, char )
local first_char = tmp:sub( 1, utf8.offset( tmp, 2 ) - 1 ) local first_char = tmp:sub( 1, utf8.offset( tmp, 2 ) - 1 )
if first_char == char then pos[i] = true end if first_char == char then pos[i] = true end
tmp = tmp:gsub( '^' .. first_char, '' ) tmp = tmp:gsub( '^' .. first_char, '' )
i = i + 1
end end
end end
return pos return pos