won't break repeat if jump by the closed pair in the same line
This commit is contained in:
parent
15256d0e94
commit
5979999a17
@ -148,8 +148,13 @@ function! AutoPairsInsert(key)
|
|||||||
|
|
||||||
" Fly Mode, and the key is closed-pairs, search closed-pair and jump
|
" Fly Mode, and the key is closed-pairs, search closed-pair and jump
|
||||||
if g:AutoPairsFlyMode && has_key(b:AutoPairsClosedPairs, a:key)
|
if g:AutoPairsFlyMode && has_key(b:AutoPairsClosedPairs, a:key)
|
||||||
|
let n = stridx(after, a:key)
|
||||||
|
if n != -1
|
||||||
|
return repeat(s:Right, n+1)
|
||||||
|
end
|
||||||
if search(a:key, 'W')
|
if search(a:key, 'W')
|
||||||
return s:Right
|
" force break the '.' when jump to different line
|
||||||
|
return "\<Right>"
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user