mirror of
https://github.com/jiangmiao/auto-pairs.git
synced 2025-11-03 08:52:48 +08:00
Fix #238 doule quote closing broken
This commit is contained in:
@ -190,6 +190,7 @@ func! AutoPairsInsert(key)
|
|||||||
" check open pairs
|
" check open pairs
|
||||||
for [open, close, opt] in b:AutoPairsList
|
for [open, close, opt] in b:AutoPairsList
|
||||||
let ms = s:matchend(before.a:key, open)
|
let ms = s:matchend(before.a:key, open)
|
||||||
|
let m = matchstr(afterline, '^\v\s*\V'.close)
|
||||||
if len(ms) > 0
|
if len(ms) > 0
|
||||||
" process the open pair
|
" process the open pair
|
||||||
|
|
||||||
@ -198,6 +199,9 @@ func! AutoPairsInsert(key)
|
|||||||
" when <!-- is detected the inserted pair < > should be clean up
|
" when <!-- is detected the inserted pair < > should be clean up
|
||||||
let target = ms[1]
|
let target = ms[1]
|
||||||
let openPair = ms[2]
|
let openPair = ms[2]
|
||||||
|
if len(openPair) == 1 && m == openPair
|
||||||
|
break
|
||||||
|
end
|
||||||
let bs = ''
|
let bs = ''
|
||||||
let del = ''
|
let del = ''
|
||||||
while len(before) > len(target)
|
while len(before) > len(target)
|
||||||
|
|||||||
Reference in New Issue
Block a user