mirror of
https://github.com/chenasraf/vim-matchup.git
synced 2026-05-18 01:38:57 +00:00
Improve ]% (again)
This commit is contained in:
@@ -167,17 +167,15 @@ function! matchup#motion#find_unmatched(visual, down) " {{{1
|
||||
if l:exclusive
|
||||
let l:new_pos[1] -= 1
|
||||
else
|
||||
if l:is_oper
|
||||
let l:new_pos[1] += matchup#delim#end_offset(l:delim)
|
||||
else
|
||||
let l:new_pos[1] = matchup#delim#jump_target(l:delim)
|
||||
endif
|
||||
let l:new_pos[1] += matchup#delim#end_offset(l:delim)
|
||||
endif
|
||||
endif
|
||||
|
||||
" if the cursor didn't move, increment count
|
||||
if matchup#pos#equal(l:save_pos, l:new_pos)
|
||||
let l:count += 1
|
||||
elseif l:tries
|
||||
break
|
||||
endif
|
||||
|
||||
if l:count <= 1
|
||||
@@ -185,6 +183,10 @@ function! matchup#motion#find_unmatched(visual, down) " {{{1
|
||||
endif
|
||||
endfor
|
||||
|
||||
if a:down && !l:is_oper
|
||||
let l:new_pos[1] = matchup#delim#jump_target(l:delim)
|
||||
endif
|
||||
|
||||
" this is an exclusive motion, [%
|
||||
if !a:down && l:exclusive
|
||||
normal! o
|
||||
|
||||
Reference in New Issue
Block a user