diff options
author | Lewis Russell <lewis6991@gmail.com> | 2025-02-10 11:04:01 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-02-10 03:04:01 -0800 |
commit | e1dc824b7ef451d3238bd867e50ef6906eb3ea86 (patch) | |
tree | e7d87608be89c762ba193e7cd671f06f401f9920 /runtime/lua | |
parent | ad8e0cfc1dfd937c2577dc032e524c799a772693 (diff) | |
download | rneovim-e1dc824b7ef451d3238bd867e50ef6906eb3ea86.tar.gz rneovim-e1dc824b7ef451d3238bd867e50ef6906eb3ea86.tar.bz2 rneovim-e1dc824b7ef451d3238bd867e50ef6906eb3ea86.zip |
build: set luals checklevel to Hint #32392
Diffstat (limited to 'runtime/lua')
-rw-r--r-- | runtime/lua/vim/re.lua | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/runtime/lua/vim/re.lua b/runtime/lua/vim/re.lua index e0a36703e3..5677230946 100644 --- a/runtime/lua/vim/re.lua +++ b/runtime/lua/vim/re.lua @@ -7,7 +7,7 @@ --- documentation available at runtime/lua/vim/_meta/re.lua -- imported functions and modules -local tonumber, type, print, error = tonumber, type, print, error +local tonumber, type, error = tonumber, type, error local setmetatable = setmetatable local m = require"lpeg" @@ -63,10 +63,10 @@ local function updatelocale () mem = {} -- restart memoization fmem = {} gmem = {} - local mt = {__mode = "v"} - setmetatable(mem, mt) - setmetatable(fmem, mt) - setmetatable(gmem, mt) + local mt0 = {__mode = "v"} + setmetatable(mem, mt0) + setmetatable(fmem, mt0) + setmetatable(gmem, mt0) end @@ -74,7 +74,7 @@ updatelocale() -local I = m.P(function (s,i) print(i, s:sub(1, i-1)); return i end) +-- local I = m.P(function (s,i) print(i, s:sub(1, i-1)); return i end) local function patt_error (s, i) @@ -240,7 +240,8 @@ local function find (s, p, i) cp = mm.P{ mm.Cp() * cp * mm.Cp() + 1 * mm.V(1) } fmem[p] = cp end - local i, e = cp:match(s, i or 1) + local e + i, e = cp:match(s, i or 1) if i then return i, e - 1 else return i end |