Support count of next/previous in visual mode
This commit is contained in:
parent
bf093abbdf
commit
7a03e86471
@ -305,6 +305,7 @@ function! EasyMotion#DotRepeat(visualmode) " {{{
|
||||
endfunction " }}}
|
||||
function! EasyMotion#NextPrevious(visualmode, direction) " {{{
|
||||
" Move next/previous destination using previous motion regexp
|
||||
let cnt = v:count1 " avoid overwriting
|
||||
if !has_key(s:previous, 'regexp')
|
||||
call s:Message("Previous targets doesn't exist")
|
||||
let s:EasyMotion_is_cancelled = 1
|
||||
@ -322,7 +323,7 @@ function! EasyMotion#NextPrevious(visualmode, direction) " {{{
|
||||
" FIXME: blink highlight
|
||||
silent exec 'normal! gv'
|
||||
endif
|
||||
for i in range(v:count1)
|
||||
for i in range(cnt)
|
||||
" Do not treat this motion as 'jump' motion
|
||||
keepjumps call searchpos(re, search_direction)
|
||||
endfor
|
||||
|
@ -237,12 +237,12 @@ xnoremap <silent><Plug>(easymotion-dotrepeat)
|
||||
noremap <silent><Plug>(easymotion-next)
|
||||
\ :<C-u>call EasyMotion#NextPrevious(0,0)<CR>
|
||||
xnoremap <silent><Plug>(easymotion-next)
|
||||
\ <Esc>:<C-u>call EasyMotion#NextPrevious(1,0)<CR>
|
||||
\ :<C-u>call EasyMotion#NextPrevious(1,0)<CR>
|
||||
|
||||
noremap <silent><Plug>(easymotion-prev)
|
||||
\ :<C-u>call EasyMotion#NextPrevious(0,1)<CR>
|
||||
xnoremap <silent><Plug>(easymotion-prev)
|
||||
\ <Esc>:<C-u>call EasyMotion#NextPrevious(1,1)<CR>
|
||||
\ :<C-u>call EasyMotion#NextPrevious(1,1)<CR>
|
||||
"}}}
|
||||
|
||||
" -- Line Motion {{{
|
||||
|
Loading…
Reference in New Issue
Block a user