Skip to content

Commit 89e7529

Browse files
committed
Enforce autopairs#Utils#escape() over escape()
1 parent 130d9df commit 89e7529

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

autoload/autopairs.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ func! autopairs#AutoPairsFastWrap(...)
342342

343343
let match = []
344344
let esc = substitute(close, "'", "''", "g")
345-
let esc = escape(esc, '\')
345+
let esc = autopairs#Utils#escape(esc, opt)
346346

347347
" TODO: Wtf is this for?
348348
let res = substitute(after, '^\V' .. esc, '\=add(match, submatch(0))', '')

autoload/autopairs/Insert.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ fun! autopairs#Insert#checkClose(key, before, after, afterline)
145145
" This may check multiline depending on something.
146146
" Still not entirely sure what this brings to the table that the
147147
" other clause doesn't
148-
let m = matchstr(a:after, '\v^\s*\zs\V' .. escape(close, '\'))
148+
let m = matchstr(a:after, '\v^\s*\zs\V' .. autopairs#Utils#escape(close, opt))
149149
if m != ''
150150
if opt['multiline']
151151
if b:AutoPairsMultilineCloseDeleteSpace && b:autopairs_return_pos == line('.') && getline('.') =~ '\v^\s*$'

0 commit comments

Comments
 (0)