Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
name-snrl committed Mar 19, 2024
1 parent 797260f commit 5e9b8fa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lua/nvim-autopairs/conds.lua
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ cond.before_regex = function(regex, length)
---@param opts CondOpts
return function(opts)
log.debug('before_regex')
local str = utils.text_sub_char(opts.line, opts.col - 1, length or -opts.col)
local str = utils.text_sub_char(opts.line, opts.col - 1, -length or -opts.col)
if str:match(regex) then
return true
end
Expand Down Expand Up @@ -121,7 +121,7 @@ cond.not_before_regex = function(regex, length)
return function(opts)
log.debug('not_before_regex')
log.debug(length)
local str = utils.text_sub_char(opts.line, opts.col - 1, length or -opts.col)
local str = utils.text_sub_char(opts.line, opts.col - 1, -length or -opts.col)
if str:match(regex) then
return false
end
Expand Down

0 comments on commit 5e9b8fa

Please sign in to comment.