Fix jump incorrect
This commit is contained in:
parent
2de4b15cc5
commit
8d2f838205
@ -198,10 +198,10 @@ func! AutoPairsInsert(key)
|
||||
end
|
||||
end
|
||||
if open != close
|
||||
let m = s:matchend(after, '^\v\s*\zs\V'.close)
|
||||
if len(m) > 0
|
||||
let m = matchstr(after, '^\v\s*\zs\V'.close)
|
||||
if m != ''
|
||||
" skip close pair greedy
|
||||
call search(m[1], 'We')
|
||||
call search(m, 'We')
|
||||
return "\<Right>"
|
||||
end
|
||||
end
|
||||
@ -285,6 +285,15 @@ func! AutoPairsDelete()
|
||||
return repeat("\<BS>", s:ulen(b)).repeat("\<DELETE>", s:ulen(a))
|
||||
end
|
||||
endfor
|
||||
|
||||
return "\<BS>"
|
||||
" delete the pair foo[]| <BS> to foo
|
||||
for [open, close] in b:AutoPairsList
|
||||
let m = s:matchend(before, '\V'.open.'\v\s*'.'\V'.close.'\v$')
|
||||
if len(m) > 0
|
||||
return s:backspace(m[2])
|
||||
end
|
||||
endfor
|
||||
return "\<BS>"
|
||||
endf
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user