From 5e7e75ecc9660988f26489b390ff685dd68de364 Mon Sep 17 00:00:00 2001 From: name_snrl Date: Sun, 10 Mar 2024 16:51:08 +0500 Subject: [PATCH] fix #440 --- lua/nvim-autopairs/conds.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lua/nvim-autopairs/conds.lua b/lua/nvim-autopairs/conds.lua index dc10eeb1..a07518e0 100644 --- a/lua/nvim-autopairs/conds.lua +++ b/lua/nvim-autopairs/conds.lua @@ -40,6 +40,7 @@ end cond.before_regex = function(regex, length) length = length or 1 if length < 0 then length = nil end + length = length and -length ---@param opts CondOpts return function(opts) log.debug('before_regex') @@ -117,6 +118,7 @@ end cond.not_before_regex = function(regex, length) length = length or 1 if length < 0 then length = nil end + length = length and -length ---@param opts CondOpts return function(opts) log.debug('not_before_regex')