Skip to content

Commit d4f8be1

Browse files
fix the argument forwarding (comply to the current interfaces)
1 parent 6ced4d3 commit d4f8be1

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

lua/luasnip/extras/expand_conditions.lua

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ function M.line_end(line_to_cursor)
1111
end
1212

1313
local memoization_mt = {
14-
__unm = function(o1) return function() return not o1() end end,
15-
__add = function(o1,o2) return function() return o1() or o2() end end,
16-
__mul = function(o1,o2) return function() return o1() and o2() end end,
14+
__unm = function(o1) return function(...) return not o1(...) end end,
15+
__add = function(o1,o2) return function(...) return o1(...) or o2(...) end end,
16+
__mul = function(o1,o2) return function(...) return o1(...) and o2(...) end end,
1717
-- TODO more logic operators
18-
__call = function(tab)
19-
if not tab.mem or tab.invalidate(tab) then
20-
tab.mem = tab.func()
18+
__call = function(tab, line_to_cursor, matched_trigger, captures)
19+
if not tab.mem or tab.invalidate(tab, line_to_cursor, matched_trigger, captures) then
20+
tab.mem = tab.func(line_to_cursor, matched_trigger, captures)
2121
end
2222
return tab.mem
2323
end

0 commit comments

Comments
 (0)