Skip to content

Commit

Permalink
fix: get_rule causing a stack overflow (#355)
Browse files Browse the repository at this point in the history
the method was recursively calling itself without doing anything useful, it was supposed to call `get_rules` instead.
  • Loading branch information
schardev committed Apr 30, 2023
1 parent 8225f4c commit 7747bba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/nvim-autopairs.lua
Expand Up @@ -80,7 +80,7 @@ M.add_rule = function(rule)
end

M.get_rule = function(start_pair)
local tbl = M.get_rule(start_pair)
local tbl = M.get_rules(start_pair)
if #tbl == 1 then
return tbl[1]
end
Expand Down

0 comments on commit 7747bba

Please sign in to comment.